Hi @Clive Wightman
In Report Designer, all parameters required by the subreport must be included in the Parameters list. If a required parameter is missing, the subreport will not display correctly in the main report.
For more details, you can refer to this link: add-a-subreport-and-parameters-report-builder-and-ssrs.
Best regards,
Aniya
SSRS Sub Reports Not passing Paramteres
HI
I'm Running SQL Server 2019, with Reporting Services.
I'm creating a report that only has 4 sub reports within it.
When I run the sub reports indiviually they work fine.
When I run the report selecting multiple sub reports it fails, 2 paramaters are not being passed.
Please could someone help me with this.
Thanks
Clive
-
AniyaTang-MSFT 12,321 Reputation points Microsoft Vendor
2022-11-21T08:32:54.817+00:00
2 additional answers
Sort by: Most helpful
-
AniyaTang-MSFT 12,321 Reputation points Microsoft Vendor
2022-11-21T09:00:59.237+00:00 Hi @Clive Wightman
I did a test.
Two subreports are created, one subreport contains the multivalued parameter "id" and the other subreport contains the multivalued parameter "Name". Then add these two subreports to the main report. Also create two multi-valued parameters "id" and "Alias" in the main report, and pass the values to the parameters "id" and "Name" of the subreport respectively.
At the same time, parameters need to be added in the parameter window of the subreport properties.
Subreport1:
Subreport2:
Preview:
Best regards,
Aniya -
Clive Wightman 126 Reputation points
2022-11-21T10:30:29.473+00:00 Ok so I have,
Within the main report I have
Yet when I run one of these one there own the report is returned.
When I run all 4 together
The error log
An error has occurred while processing a sub-report. Details: One or more parameters were not specified for the subreport
executionlog shows
SELECT * FROM dbo.ExecutionLogStorage els
WHERE els.UserName LIKE '%wightman%'
AND els.TimeStart > CAST(GETDATE() AS DATE)COMPUTE_DATE=11%2F21%2F2022%2010%3A21%3A32
&BP_RELATIONSHIP_ID=544
&DISCOUNT=0
&MAXLIMIT=100
&TARIFFS=AIR_EXPRESS_IMPORT
&TARIFFS=AIR_EXPRESS
&TARIFFS=Road_Express
&TARIFFS=Road_Express_Imports