Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Comments
Maciej Los 22-May-12 16:50pm    
We need more details: table structure, example data.
ShaikhM 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

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

thx, sam
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900