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!

Subreports- formula's

Status
Not open for further replies.

roswelltx

Technical User
Aug 31, 2005
21
US
Is it possible to create a formula that will divide one total from the main report with a total on a subreport. Can this even be done?
Thanks,
Regina
 
Yes, this can be done by using shared variables.

Create a formula on your subreport to assign the total to a varibale i.e.

//@SubTotal
WhilePrintingRecords;
Shared NumberVar SRTotal := {TotalField};

Then this can be used in your main report and added to your main report total i.e.

//@GrandTotal
WhilePrintingRecords;
Shared NumberVar SRTotal;

{MainReportTotalField} + SRTotal

The grand totalformula will only work if it is placed ina section after/below the subreport section.

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top