Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Passing Selection Results to Subreports

Hi

I'm sure that this is a stupid question But If I have carried out a selection query in my main report which returns say 1000 postcodes how can I pass these to t a subreport to select the same 1000 postcodes? By linking the fields that contains the postcodes the parameter created only contains the first postcode.

Thanks

replied

Hi James,

Try creating a formula like

@Initialize:

WhilePrintingRecords;
stringVar str:="0";

Place this formula in report header

Now create another formula like

@Evaluate:

WhilePrintingRecords;
stringVar str;
str:=str+","+totext({PostCode});

Now create a command in the subreport like

select * from table where postcode in ({?StringParameter})

Now place the subreport in report footer and link the command level parameter from subreport ({?StringParameter}) with formula @Evaluate

Now the subreport results uses all the passcodes from main report.

Regards,

Raghavendra

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question