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

Shared Variables 1

Status
Not open for further replies.

mwake

Programmer
Feb 12, 2004
151
US
I'm using CRv10 and am creating a warehouse productivity report. I've created 1 report on the order level and a subreport on the item level. I'm trying to pass totals from the subreport to the main report, but I just get 0.00.
I created the shared variable in the subreport and placed it in the report and the correct number appears. However, it appears as a zero in the main report. My formula in the main report is Shared NumberVar Item; Item. I've placed the subreport in the detail section of the main report and I need the shared variable to appear in the report footer section where the summary order data appears. What am I doing wrong here?? Do I need to place the subreport elsewhere??
 
By placing the subreport in the details it's going to fire for every row in the main report.

Since you're intednign to only use the returned value once in the main report (otherwise you wouldn't have it in the main report footer), the subreport is returning the last value in the details.

Right click the report footer and select insert section below.

Place the subreport in the Report Footer A, and your formula in the Report Footer B.

It should return the correct result for the relationship between main and subreports (however you linked) for the last row of the main report.

Text descriptions are a difficult way to convey requirements, try demonstrating the following:

Example data
Report layout (include where the subreport is)
Expected output

-k
 
You also might need to add "whileprintingrecords;" to the beginning of the formula to get the value to appear in the report footer.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top