user1147941
user1147941

Reputation: 121

Return multiple instances of SSRS report inside report

I have a multi-value parameter, for which each value I need to render a copy of a report.

I have a main report w/ a multi-value parameter. The main report has a list control, with a subreport inside. The main report calls a stored procedure that splits the comma delimited multi-value parameter, and returns it to the dataset.

I'm having 2 problems: 1) When it returns multiple copies of the subreport, it's always the report for the first item in the comma delimited list 2) Occasionally, when I attempt to have more than one value in the multi-value parameter, it throws an error saying "One or more parameters were not specified for the subreport, 'SubReport1', located at: ."

How can I get the subreport to show for each value in the multi-value parameter?

Upvotes: 0

Views: 693

Answers (1)

Tak
Tak

Reputation: 1562

Below is an example of simple report and I think the logic is the same or I may have misunderstood your requirement.

Added a List object to main report. In List object add data from dataset and sub report. In the sub report there is a parameter called @subParam1

enter image description here

Sub report parameter setting passing data from dataset.

enter image description here

Select Multiple parameters. This will be passed to the stored procedure and the dataset returns 3 records:

ABC

DEF

GHI

enter image description here

Preview output is

enter image description here

Upvotes: 0

Related Questions