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!

Only Last Record Shows in Subreport

Status
Not open for further replies.

pator

MIS
Sep 28, 2004
17
IE
Using CRXI
SAP datasource

I have a subreport placed in a report footer Q in my main report.The subreport is linked by a Formula called
@CreateKpi. When the report runs I can only see the last
value in the subreport.

I placed it in the details section to verify the link is working and I get multilpe values returned.

I Have spent a good while searching this site but can't find a solution.

This is my code in the subreport

Report Record Selection Formula in the Subreport
EvaluateAfter ({?Pm-@CreateKPI});
{Z_FS_READ_TEXT.I_ZCLIENT} = "100" and
{Z_FS_READ_TEXT.I_ZID}= "ST" and
{Z_FS_READ_TEXT.I_ZLANGUAGE}= "E" and
{Z_FS_READ_TEXT.I_ZNAME}= {?Pm-@CreateKPI} and
{Z_FS_READ_TEXT.I_ZOBJECT}= "TEXT"


GH1
WhilePrintingRecords;
Stringvar chain := "";

Detail Section
WhilePrintingRecords;
stringvar chain:= chain+{Z_FS_READ_TEXT.T_ZLINES.TDLINE}+ " ";

GF1
WhilePrintingRecords;
Stringvar Chain;
chain

This field {Z_FS_READ_TEXT.T_ZLINES.TDLINE} holds comments
for the {Z_FS_READ_TEXT.I_ZNAME} field the subreport is grouped on.

Any Sugestions Appreciated

Regards
Pator





 
If you have the subreport linked to the main report on a formula when the sub is placed in the report footer, it will only pick up the last value of that formula in the main report. You either have to place the sub in a group footer corresponding to a group based on {@CreateKPI} (the simplest approach) or you have to collect the values of {@CreateKPI} in the main report in an array or string, and pass them to the subreport in the report footer.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top