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

Match Subreport variable in Main report Group for Calcualtation

Status
Not open for further replies.

fredong

IS-IT--Management
Sep 19, 2001
332
US
I am using CR V.8.0. On my Main report I have a group by Vendor with summarized the TotalSale and on my Subreport I have the same Grouped by vendor and I have summarized the TotMaterialCost and linked by Postdate and Vendor to the Main report. I need to place the TotMaterialcost from the subreport in the Main report Group section and do some calculations. Is that possible? I have also created variable on the subreport TotMaterial to placed it on the Main report but it does not seems to get the right data for the right vendor.

//subreport
Whileprintingrecords;
shared NumberVar TotMatCost;
TotMatCost:= sum({timCostTier.TotMaterialCost}, {tapVendor.VendID});
TotMatCost


//MainReport.
WhileprintingRecords;
Shared NumberVar TotMatCost;
TotMatCost

Please help.Thanks.

 
Shared variables.can only be used in the main-report section below the section that calls the subreport. Is that the problem?



[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Yes, that is the problem. I am trying to place it the Group vendor Main report and it did not work. Do you have any ideas? Thanks.
 
You can create a new section below any exising section - right-click and 'Insert Section Below]. You can also reduce the size of a subreport by changing its font-size within the main report. You can have two copies of a subreport - one tiny to get the key values and the other normal-size for reporting. (Note that subreports can be saved separately from within the subreport, at least in Crystal 8.5 and above.)

In Crystal 10 you can also 'underlay' a section, but you've probably not got that.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top