cancel
Showing results for 
Search instead for 
Did you mean: 

Drill down OK statistics compilation on subreports

former_member557357
Participant
0 Kudos

Hi,

I have two parameters in the main report ( one is dynamic and other one is date range as static) My two subreports are drill down Ok or drill down not ok and all I have the total numbers of items in GH. Now I have a hard time using these reports as subreports as all my sub reports also have both parameters. It is not filtering properly. What am I doing wrong.

All I need is to get a grand total of both sub reports by item type.

I can not use them as unlinked report as thses reports will be accessed by 250 locations.

Please help!

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

So, if I understand you correctly, you want to get the values from the subreports up to the main report so that you can add the values together. Is that correct? If it is, here's what you'll do:

1. In the main report, create two formulas. One will be use to initialize the variables you'll need for this and the other to add them together and display the value. Put the first one before the subreports and the second one after the subreports. The formulas will look something like this:

{@InitVars}
WhilePrintingRecords;
Global NumberVar sub1total := 0;
Global NumberVar sub2total := 0;

{@AddVars}
Global NumberVar sub1total;
Global NumberVar sub2total;
sub1total + sub2total

2. The two subreports will have to be run BEFORE you can use the values. Also, you cannot get a total from a subreport that only appears on drilldown because it doesn't process until it is displayed. In each of the subreports, you'll create a formula that gets the total. They might look like this:

{@Sub1Value}
Global NumberVar sub1total := sum({field to be totalled})

-Dell