How Send a DataSet With 2 DataTable to Report

Stimulsoft Reports.NET discussion
Post Reply
p30help
Posts: 9
Joined: Tue Aug 28, 2012 12:05 pm

How Send a DataSet With 2 DataTable to Report

Post by p30help »

i work with c# and Connect my c# program to stimulsoft.
i send a dataset with 2 datatable to my report with Below Code:

Code: Select all

DataSet ds = new DataSet();
dtP.TableName = "dtP";
dtF.TableName = "dtF";
ds.Tables.Add(dtP);
ds.Tables.Add(dtF);
Report.RegData(ds);
Report.Show();
and "Report" is stireport object.
when my report page shown. my report is empty. why?
And when sent just 1 datatable as Dataset to my report that's work well.
how solve my problem?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How Send a DataSet With 2 DataTable to Report

Post by Alex K. »

Hello,

Can you please send us a sample project which reproduces the issue for analysis.

Thank you.
p30help
Posts: 9
Joined: Tue Aug 28, 2012 12:05 pm

Re: How Send a DataSet With 2 DataTable to Report

Post by p30help »

Aleksey wrote:Hello,

Can you please send us a sample project which reproduces the issue for analysis.

Thank you.
hi
i attach sample of report file in this post.
please analysis and Help me to Solve my problem.
Attachments
Sanad1.mrt
(57.22 KiB) Downloaded 570 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How Send a DataSet With 2 DataTable to Report

Post by HighAley »

Hello.

There is no data for your report. We couldn't reproduce your issue.
Please, send us a working sample project which reproduced the issue.

Thank you.
p30help
Posts: 9
Joined: Tue Aug 28, 2012 12:05 pm

Re: How Send a DataSet With 2 DataTable to Report

Post by p30help »

Aleksey Andreyanov wrote:Hello.

There is no data for your report. We couldn't reproduce your issue.
Please, send us a working sample project which reproduced the issue.

Thank you.
Hi Again
I Attach C# Project File in This Post.
In /bin/debug Folder Can Find test.mrt File.
Thanks....
Attachments
stimulsoftTest.zip
(43.68 KiB) Downloaded 767 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How Send a DataSet With 2 DataTable to Report

Post by HighAley »

Hello.

You are adding a DataSet with different name. You could see it if call Design() instead of Show() method.
Please use next code to avoid this problem:

Code: Select all

objStiReport.Dictionary.Clear();
objStiReport.RegData(ds);
objStiReport.Dictionary.Synchronize();
Thank you.
p30help
Posts: 9
Joined: Tue Aug 28, 2012 12:05 pm

Re: How Send a DataSet With 2 DataTable to Report

Post by p30help »

Aleksey Andreyanov wrote:Hello.

You are adding a DataSet with different name. You could see it if call Design() instead of Show() method.
Please use next code to avoid this problem:

Code: Select all

objStiReport.Dictionary.Clear();
objStiReport.RegData(ds);
objStiReport.Dictionary.Synchronize();
Thank you.
Hi
Thanks a lot.
I change my code and Now My program Work Well.
Thanks Again...
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How Send a DataSet With 2 DataTable to Report

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Post Reply