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!

Sub-Report Link 2

Status
Not open for further replies.

YANKRAY

Technical User
Nov 7, 2003
283
Using CR 10.0

I have a report in which I pull data from a sub-report.

The sub-report is linked to the detail line of the main report and is located in the Db section.

The correct information is shown in the main report.

I plan to suppress the Db section when I am finished with the report.

I pass two fields from the sub-report that I will use in a calculation on the main report on Da line. The information I am passing is showing up one line off (down) from where it should be. The sub-report fields were placed in the Dc section.

This is how the Sub-report variable reads:

whileprintingrecords;
Shared StringVar PurchOrd;
PurchOrd :=({PO_BLANKET.PO_NO});

This is how the main report variable reads:

whileprintingrecords;
Shared StringVar PurchOrd;
StringVar PurchOrd;
PurchOrd := PurchOrd;

Any ideas on why my result is one line off?

Thanks,
Ray
 
The subreport has to be ABOVE the section in which you are making the calculation. Also, you cannot suppress the section that a subreport is in, although you can suppress all sections within the subreport, so that it is invisible. Then you can format the subreport to "suppress blank subreport" and format the section it is in to "suppress blank section".

-LB
 
The Details A section is prior to the subreport running, so you're getting the last details data each time.

A subreport must be placed BEFORE the use of it's shar3ed variables.

-k
 
Worked great.

I put the sub-report in section Da and moved the details and the variables down to Db.

I suppressed all the sections on the sub-report and just reduced the field area. The minor spacing did not affect the report.

Thanks again for the help.

Ray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top