Click here to Skip to main content
13,139,682 members (58,832 online)
Rate this:
Please Sign up or sign in to vote.

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 2:24am
losmac 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

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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170915.1 | Last Updated 2 Jun 2012
Copyright © CodeProject, 1999-2017
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