Stored Procedure with parameters in a sub report

Ali Ahad 71 Reputation points

I have a main report where I display percentages for last thirteen months screen shot below:


So when the user clicks on the percentages of any month a new sub report should open with all the details for that month. I am using SP for the sub report which got a file month parameter, so when I execute the SP for any of those months in SSMS using the following command:

exec mySP '2023-06-01'

I got the results but don't know how to incorporate that in SSRS.

Any help is appreciated.



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,727 questions
{count} votes

2 answers

Sort by: Most helpful
  1. AniyaTang-MSFT 12,216 Reputation points Microsoft Vendor

    Hi @Ali Ahad

    For how to add subreports and parameters to paginated reports, you can refer to this document:

    Best regards,


    0 comments No comments

  2. Wilko van de Velde 2,146 Reputation points

    Hi @Ali Ahad ,

    In addition to @AniyaTang-MSFT , check this blog for adding a stored procedure as a dataset for a report:

    Kind regards,

    If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".

    0 comments No comments