Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to get group totals

Status
Not open for further replies.

rdavis

Programmer
Apr 29, 2002
157
US
Is there a way to get group totals from a subreport and use them for froup totals for the main report? I can get totals from the subreport, but not group totals

Thanks


Rob
 
You can only return values from a subreport once the subreport has finished executing entirely.

Naith
 
You can create a running total on the passed values...
 
Naith,
that is fine, but can I get the group subtotal from the subreport and total them with the group total on the main report. e.g. I have to subreports with clients as the group, then I want to take the totals from these reports and combine them on a main report.

Thanks




Rob
 
What I mean is that when you obtaining your group totals in the subreport, the subreport will still continue to process. It isn't ready at this point to pass any information back to the main report.

The earliest you can pass subreport data back to the main report is after the entire subreport has finished processing - and by that time, you will have just completed processing on your last group. All previous group totals will have been lost.

Naith
 
If you've been able to pass the values from the subreports you should be able to use those values to calculate with the main report group values.

To get the values of the groups to line up. Create a section for that group, move it above then format the new section to "underlay following sections" Move the Supreport into the new section. You should now be able to use the passed value inside a main report formula...

I hope I'm reading your question right. If so this should work.

Noxum
 
Naith,
Once the subreport is finish, can you grab the group totals then?

BTW, I am new with subreports

Thanks




Rob
 
No problem, Rob.

Here's how it works.

Let's say your setup looks like this:
Code:
-MainReport-
Main GH1
    -SubReport-
    GH1 AAA
    D   xxxx
    GF1 AAA
    GH1 BBB
    D   xxxx
    GF1 BBB
Main GF1
What it seems you want to do is have the subreport pass both the GF1 AAA and GF1 BBB data through to the main report. However, before the subreport passes any data to the main report, it has to finish running the subreport - which means that, first, the next group will be processed.

This will continue until the subreport runs out of groups, at which point, you're able to pass values back to the main report. But, you'll only be able to pass one group detail back, as the subreport will only be able to pass once per main report section. And so, as it was the last group to be processed, it's BBB which would be returned to the main report. You wouldn't be able to return AAA because you would not be able to interrupt the subreport to do this.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top