SSRS Sub Reports Not passing Paramteres

Clive Wightman 126 Reputation points
2022-11-21T07:57:20.98+00:00

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

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,869 questions
0 comments No comments
{count} votes

Accepted answer
  1. AniyaTang-MSFT 12,421 Reputation points Microsoft Vendor
    2022-11-21T08:32:54.817+00:00

    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

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. AniyaTang-MSFT 12,421 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.
    262428-4.png
    At the same time, parameters need to be added in the parameter window of the subreport properties.
    Subreport1:
    262532-5.png
    Subreport2:
    262479-6.png
    Preview:
    262543-7.png
    Best regards,
    Aniya

    0 comments No comments

  2. Clive Wightman 126 Reputation points
    2022-11-21T10:30:29.473+00:00

    Ok so I have,

    262596-image.png

    Within the main report I have

    262577-image.png

    Yet when I run one of these one there own the report is returned.

    When I run all 4 together

    262597-image.png

    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