SSRS - One or more parameters were not specified for the subreport

Terry St Jean 81 Reputation points
2022-09-30T18:42:10.587+00:00

I am using VS 2019 and I have a report with 3 subreports.
When I run the report in Visual Studio, the report runs okay , the first time.
When I run it a second time, I get the error "One or more parameters were not specified for the subreport" for each of the subreports.
If I delete the .rdl.data file, the report runs fine the first time again but fails each time its run after.
Any idea what is going on?

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,826 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Joyzhao-MSFT 15,566 Reputation points
    2022-10-03T05:00:51.807+00:00

    Hi @Terry St Jean ,
    This error message hints that either the report parameter has not been passed from the parent report to the subreport or that the wrong format of report parameter or an unacceptable value for the report parameter has been passed from the mainreport to the subreport. Can you check the report parameters that are being passed once again?

    You may notice that the repeat execution time in Visual Studio is hardly as long as the first execution time. This is because of the rdl.data file. In the solution folder, there are the definition files for every report (.rdl files) and every definition file will have a data file (.rdl.data), that is, every report will have a data file once it has been previewed .

    It sounds like the subreport only renders properly the first time you work on the report, you can run the subreport individually to see if the subreport works. Does this behavior still exist if deploying to the report server?

    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.