SSRS SubReport

Anna 21 Reputation points
2021-11-09T14:32:42.467+00:00

I have a report where the main report have several detail resord and would like to display a subreport that have multiple related records as well.
Example:
147760-image.png

The main and subreport is related by the lot number.
I am passing a parameter to the subreport using the Lot serial number of the main report.
Sounds simple but my subreport is not displaying. I get an Error Subreport could not be shown.
What am i doing wrong?

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.
3,065 questions
{count} votes

Accepted answer
  1. Joyzhao-MSFT 15,636 Reputation points
    2021-11-10T03:11:27.237+00:00

    Hi @Anna ,
    Please follow the steps below to check:

    1. To check whether there are any errors in the subreport, please run the subreport independently. If it show output means there is no error in sub-report.
    2. Then remove delete sub-report and run main report individually, check whether if it shows output successfully.
    3. If both main report and subreport run properly, please check the parameters passed between reports. Make sure the data types are the same between the parameters, and the values passed to the subreport parameters are valid.
    4. In Report Designer, all parameters that are required by the subreport must be included in the Parameters list. If a required parameter is missing, the subreport is not displayed correctly in the main report. Consider the following scenario, the available values for sub report parameter contains val1, val2 and val3. If you pass a val4 from main report to call the sub report, it will prompt the Error: Subreport could not be shown.

    If you have any questions, please feel free to let me know.
    Best Regards,
    Joy


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.