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

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.
 
ie:
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
Comments
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
good
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
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 605
1 Maciej Los 319
2 BillWoodruff 184
3 Richard MacCutchan 180
4 Suraj Sahoo | Coding Passion 180
0 OriginalGriff 8,654
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,229
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 2 Jun 2012
Copyright © CodeProject, 1999-2014
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