cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report--> Running a subreport for list of external parameters

Former Member
0 Kudos

I have a sub report that provides sales generated by a given person:

Person XXX

Item Name    Items Sold
A4 .............. 10
A6 ............... 8
A7 ............... 6

I want to modify this report to generate a single page report for a list of sales persons to be passed through the main report:

Person XXX

Item Name    Items Sold
A4 .............. 10
A6 ............... 8
A7 ............... 6

Person YYY

Item Name    Items Sold
A4 .............. 30
A6 ............... 4
A7 ............... 7

Person ZZZ

Item Name    Items Sold
A4 .............. 3
A6 ............... 14
A7 ............... 17

My question is how does one setup such report? I am not sure about which options to use while specifying the parameters for the main report.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi,

1) Create a group in the Main Report using the "Name" Field or "ID" field; whichever uniquely identifies the Person.

2) Insert a Subreport either in the Group Header/Group Footer. The datasource for this report should contain a table with the Field being used in the Main Report.

3) Next, create and format the Subreport.

4) Right-click the Subreport and select "Change Subreport Links". Then move the Field that uniquely identifies the person; could be the person name field or the ID field to the "Fields to link to" area.

Then, at the bottom where it says "Select data in Subreport based on field", choose the ID/Name field from the dropdown. More often than not CR will automatically select a field for you from the drop-down. You just need to make sure that's the right one; otherwise choose the right one.

That's it! Please let me know how this goes!

- Abhilash

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Actually the result that I showed is output from a procedure, so ideally what I want is a way to pass contents of list one by one to the procedure (along with other parameters such as begin date, end date, zone that do not change for a given run).

Apologies for not mentioning this earlier.

Answers (0)