Sum a column in subreport and show in main report

Stimulsoft Reports.NET discussion
prajan
Posts: 49
Joined: Tue Apr 23, 2013 1:28 pm

Re: Sum a column in subreport and show in main report

Post by prajan »

Hi,
I created a website using the report that you sent. PFA.
The data for the report is the same 'Demo' that you use.
If you run the report, you can see that the 'SumSubReport' gets calculated to '72' while it should only be '36'.
Please let me know how this can be fixed.
Thanks
Attachments
SumRep.rar
Sum report
(128.31 KiB) Downloaded 146 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Sum a column in subreport and show in main report

Post by Alex K. »

Hello,

We couldn't reproduce this bug.
Please check the last build.

Thank you.
prajan
Posts: 49
Joined: Tue Apr 23, 2013 1:28 pm

Re: Sum a column in subreport and show in main report

Post by prajan »

Hi,
I tried it using the latest build, but still the sum is getting doubled.
PFA the project and the report that is generated.
Please let me know how this can be fixed.

Thanks
Attachments
Sum report.pdf
Report generated
(45.85 KiB) Downloaded 226 times
SumRep.rar
Report project
(5.74 MiB) Downloaded 142 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Sum a column in subreport and show in main report

Post by Alex K. »

Hello,

Please try to add the following code before RegData() method:

Code: Select all

report.Dictionary.DataSources.Clear();
Thank you.
prajan
Posts: 49
Joined: Tue Apr 23, 2013 1:28 pm

Re: Sum a column in subreport and show in main report

Post by prajan »

Hi,
I tried to add the given code before the RegData() method. I still get the sum as '72' only.
It is supposed to be '36'.
I have used the report that was sent by you long time back. Are you able to recreate this scenario ? Do I need to send any more details ?
Please let me know how this issue can be resolved.

Thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Sum a column in subreport and show in main report

Post by Alex K. »

Hello,

Please try to remove the following code:
report.IsRendered = false;

Thank you.
Attachments
Capture.PNG
Capture.PNG (93.14 KiB) Viewed 1974 times
prajan
Posts: 49
Joined: Tue Apr 23, 2013 1:28 pm

Re: Sum a column in subreport and show in main report

Post by prajan »

Hi,
Thanks a lot.
It did the trick.

Regards
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Sum a column in subreport and show in main report

Post by Alex K. »

Hello,

Let us know if you need any additional help.
Post Reply