0

How do i send 3 datatable to the StimulSoft report in winforms c#. I added dataset and 3 Datatable in StimulSoft report. I typed in app:

StiReport report = new StiReport();
string fileReport = "Report\\ReportTest.mrt";
string myfile = System.AppDomain.CurrentDomain.BaseDirectory + fileReport;
report.Load(myfile);
report.Compile();
report.RegData(dtDelay);
report.RegData(dtDesc);
report.RegData(dtPart);
report.Show();

Sample App

Mohsen Tarak
  • 331
  • 1
  • 3
  • 5
  • May be you can try adding DataSet object rather than DataTable. Check [this](https://www.stimulsoft.com/en/documentation/online/programming-manual/index.html?reports_js_web_designer_creating_report.htm). You can keep your DataTable(s) inside that DataSet and try using that object for report generation. – Abhinav Pandey Jul 14 '22 at 08:33
  • I am a beginner. In this link, it says that you should send the file xml to the report.How do I convert multi datatable to the xml? – Mohsen Tarak Jul 15 '22 at 07:37
  • check [this](https://stackoverflow.com/questions/12178004/how-send-a-dataset-with-2-datatable-to-stimulsoft-report?rq=1) – Abhinav Pandey Jul 15 '22 at 17:17
  • I tested the methods in that link, but my problem was not solved.I did not merge the tables because the number of columns and rows of each table is not equal – Mohsen Tarak Jul 15 '22 at 18:57
  • I can see in your SampleApp, button 2 is doing what I think you wanted. all the three tables are there in one page. By any chance are you thinking of creating a new page for all the datatables? – Abhinav Pandey Jul 16 '22 at 14:55
  • https://porsnet.ir/showQuestion/2322/%D8%A7%D8%B1%D8%B3%D8%A7%D9%84-%D9%87%D9%85%D8%B2%D9%85%D8%A7%D9%86-%DA%86%D9%86%D8%AF-DataTable-%D8%A8%D9%87-StimulSoft-Report – Mohsen Tarak Jul 19 '22 at 15:25
  • I guess you got the answer in the link you provided – Abhinav Pandey Jul 20 '22 at 06:39
  • Yes. i got answer – Mohsen Tarak Jul 21 '22 at 03:20

1 Answers1

-1

Please use my method in this post :

Customiz (or Create) a table(StiTable) at runtime in C# (.NET4)

You can call this method as many times as you want. Note that you can adjust the method and take the table name or view from code and make it dynamic , after it you can create as many tables as you want. Use the method before comlie() method.