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

Bringing Totals from my subreports to main report

Status
Not open for further replies.

report2000

Technical User
Mar 1, 2005
45
0
0
US
I created a master report that has two subrports. Each subreport is grouped by job code.
I have two tables in subreport1 - (North Data and master table that I compare the north region data to and filter only the datas that are in master table and North table) and subreport 2 that has the master table and South Region data)in master table I link both reports by parameter for date range and job code). (Master table does not have North or South tables)
When I try to copy and paster the sum values from subreports to main report I get a message saying that I do not have the table that corresoponds to the field I am trying to bring in. (Which is true)
In group footer of each subreport I have a sum of salary for that particular job category.
I would like to bring those sums into my master table and do some calculation.
Please help. how can I bring the values since in the master report i do not have the tables from the
 
Create a shared variable formula for passing values between main and subreports.

Example:

subreport:

shared numbervar MyValue:= sum({table.value},{table.gorupfield})

It can be any value

Then in the Main Report AFTER the subreport has fired you can reference the value:

numbervar AllValues;
shared numbervar MyValue;
AllValues:=AllValues+MyValue

As you can see, this would accumulate the values passed from the subreport in MyValue.

You can also pass values to subreports.

-k

 
It asks me for a number value (i.e. 1, 2,). Doesnot like this "Sum ({GAScr.Field9})
 
Check the datatype of {GAScr.Field9}. If it is a currency, then change the variable to:

shared currencyvar MyValue := sum({Gascr.field9});

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top