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

Combining totals from reports/subreports... possible?

Status
Not open for further replies.

kenndot

Programmer
May 15, 2001
316
US
Hi Folks,

I've got a report which houses a total that I would like to be able to add to the total that is on the subreport. I'm using version 6. Is this possible? How can I accomplish this?

Thank you
 
If I remember correctly version 6.0 has two functions called storevar and fetchvar. You will need to use the storevar function in the subreport i.e. StoreNumberVar total := {Field.Name}; and then in the primary report you will need to init the varialable name in the RH i.e. Numbervar total = ({field.name},0). Finally you will need to create a formula to display the value into the desired section i.e. FetchNumberVar Total + {theother.fieldname}. I have not included the exact syntax but this should get you started. NOTE: In version 8.5 all you would have to do is use a function called Shared Numbervar and this will do the same thing. If you plan to upgrade to the recent version of Crystal you will need to do some clean up on the report. This is because Crystal by default does Crystal Decsions is not supporting the StoreVar and Fetchvar functions. I hope this helps

Keith Boyer
Instructor/Consultant
kboyer@dmgrpt.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top