create report with c# code
create report with c# code
hi all.
I need to select some columns and then create sample reports with this columns via code not via designer.pleas guide me how to create report with code?
I need to select some columns and then create sample reports with this columns via code not via designer.pleas guide me how to create report with code?
create report with c# code
Hello,
Please see the sample project in attachment.
Thank you.
Please see the sample project in attachment.
Thank you.
- Attachments
-
- 899.DynamicCreateReport.zip
- (15.46 KiB) Downloaded 1753 times
create report with c# code
Hello
we check that sample,but we would like to use it in a web page and bind the databind to a sqlsource instead of binding to a xml file that you use in this sample,could you help us to chang the codes for databinding part?
we check that sample,but we would like to use it in a web page and bind the databind to a sqlsource instead of binding to a xml file that you use in this sample,could you help us to chang the codes for databinding part?
create report with c# code
Hello,
You can use the following code:
instead:
Thank you.
You can use the following code:
Code: Select all
string connString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\DATA\NWIND.MDB;Persist Security Info=False";
DataTable dt = new DataTable("Categories");
using (OleDbConnection conn = new OleDbConnection(connString))
{
OleDbCommand cmd = new OleDbCommand("SELECT * FROM Categories", conn);
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
da.Fill(dt);
}
report.RegData(dt);
report.Dictionary.Synchronize();
Code: Select all
DataSet ds = new DataSet("Demo");
ds.ReadXmlSchema("e:\\Demo.xsd");
ds.ReadXml("e:\\Demo.xml");
DataTable dt = new DataTable("Categories");
dt = ds.Tables["Categories"];
create report with c# code
Hi Aleksey
I really appreciate your concern. Your code works great on Winforms but it have some problems on Webforms.It bind the data to the connection,but it dosen't show anything.
could you check it yourself on webform and tell me what's my mistake?
Thank you very much for your help.
I really appreciate your concern. Your code works great on Winforms but it have some problems on Webforms.It bind the data to the connection,but it dosen't show anything.
could you check it yourself on webform and tell me what's my mistake?
Thank you very much for your help.
create report with c# code
Maybe i must do some changes in webforms.Could you help me?
sincerely yours
sincerely yours
create report with c# code
Hello,
If you want to display data in the WebDesigner in prewiew, you need to implement the GetPreviewDataSet method for a designer in your code.
Thank you.
If you want to display data in the WebDesigner in prewiew, you need to implement the GetPreviewDataSet method for a designer in your code.
Thank you.
create report with c# code
Hi Aleksey
You mean i must create the report,bind it to the datasouce and so on ,in GetPreviewDataSet event of StiWebDesigner?
sincerely yours
You mean i must create the report,bind it to the datasouce and so on ,in GetPreviewDataSet event of StiWebDesigner?
sincerely yours
create report with c# code
Can you be a bit more precise and tell the changes in codes with presise details in that method?
I appreciate it very much!
sincerely yours
I appreciate it very much!
sincerely yours
create report with c# code
Hello,
Sorry for the delay with response. We need some additional time to prepare the sample project for you.
Thank you.
Sorry for the delay with response. We need some additional time to prepare the sample project for you.
Thank you.