Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: SAP Reports CrystalReports , +

I would have the following problem:

I am currently having 1 main report and 2 subreports. In both subreports a weekly sum of sales is calculated and grafically displayed via a chart. Both subreports use different db tables.
SubReport_1: tbl_Product_A
Subreport_2: tbl_Product_B

In subreport 1 the total amount of sales of product A is calculated on a weekly base.

In subreport 2 the total amount of sales of product B is calculated on a weekly base.

Now I would need the weekly sums of both sub reports within my main report in order to calculate the amount of total sales of product A + product B on a weekly base.
Unfortunately, I fail on doing that. I tried to add the weekly sub totals to a shared array in order to use it in my main report, but this causes me to have loads of variables within my main report.
Is there any way of accomplishing this in an easy way?

I hope I expressed my prolem as clearly as possible and I hope someone can help me.

Thanks a lot, cheers.
Posted 22-May-12 3:24am
losmac at 22-May-12 16:50pm
We need more details: table structure, example data.
ShaikhM at 24-May-12 20:35pm
I think the approach you have taken is probably the most obvious one. I would do the same.
But instead of an array can you try a shared variable. Idea remains the same.
And theres no better way I can think of.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Thanks for your help guys, but I achieved what was need with a simple "UNION" of the tables!
thx, sam

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 512
1 Maciej Los 445
2 Sergey Alexandrovich Kryukov 421
3 CPallini 200
4 PIEBALDconsult 158
0 Sergey Alexandrovich Kryukov 6,813
1 OriginalGriff 5,342
2 Peter Leow 3,837
3 Mika Wendelius 2,850
4 CHill60 2,748

Advertise | Privacy | Mobile
Web03 | 2.8.150224.1 | Last Updated 2 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100