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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

shared variables with subreport groups

Status
Not open for further replies.

chainedtodesk

Programmer
Feb 26, 2003
112
US
i have a question on shared variables, i have a report that is just showing totals in a grid for the quarters weekly breakout. so week 1 - 13 and in each subreport i get the data correctly. with a grand total for the quarter. i have 7 sub reports all doing similar totals based on different criteria. i want to have the main report only show the totals for each sub report by week and the grand totals. i can get the grandtotals to pass ok and are where i want, but do i have to create 13 other fields 7 times to pass each weeks numbers to the main report? or is there a way to do it all in one statement??? thanks all for any help.
 
This is impossible to answer without knowing in what section of the main report the subs are located, and without knowing how the subs are linked to the main report. Also need to know how you created the weekly totals in the subs--are these found in a group based on week? Or did you use conditional formulas to create the weekly totals?

If all subs are similar, I think you should just use one as an example, and answer these questions. Show the content of formulas where appropriate.

In general, if you have totals in one report section of the sub, you could create a shared variable formula that passes multiple variables, like this:

whileprintingrecords;
shared numbervar wk1 := sum({@wk1});
shared numbervar wk2 := sum({@wk2});
shared numbervar wk3 := sum({@wk3});

Then you can reference these results in the main report in a section below the one containing the sub.

-LB
 
sorry for not giving enough info, all the sub reports are in group hdr1 of the main report and the final output is in the footer, i have each sub report breaking the counts out by the grouping of "FiscalWeek" so it will be 1-13 or 14-26, 27-39, 40-52 based on the process dates. i think what you have shown will help me get started. thanks for your post
 
Unless you are also grouping on fiscal week (your group#1) in the main report, you will have to take a different approach to passing the variables.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top