Run subreport by click event on table result

Artimes 346 Reputation points
2021-02-02T15:32:26.27+00:00

Is it possible to run a subreport by clicking a row of a table? Assume you organize your results of a report in a table. In this table there is a id-column. And if you click a row you want to run a subquery with this id as parameter.

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

Accepted answer
  1. Joyzhao-MSFT 15,596 Reputation points
    2021-02-03T03:35:36.77+00:00

    Hi @Artimes

    And if you click a row you want to run a subquery with this id as parameter.

    If you need to pass the ID parameter to the subreport, you need to have the corresponding ID parameter in the target report (subreport).
    For example: I have two reports, namely "parentreport" and "subreport". I pass the "Year" parameter in parentreport to subreport. When I click on the corresponding year in parentreport, it will jump to that year in subreport . In the subreport, I configured the year parameter, and in the parentreport, I added the "Go to report" operation.
    63318-paremeters-year.jpg
    63305-parentreport-01.jpg

    Here is a Gif file:
    63250-go-to-report2.gif

    Note: When the report to be transferred is in the same project as the current report, the target report is included in the drop-down list. Otherwise, we can directly enter the report name in the box. Currently the two reports are stored in the same folder on the same report server, we can only enter the report name. If two reports are stored in different folders, the folder path and report name must be provided. If the location of the target report is changed, it must be corrected in the Action property of the source report.

    Best Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    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.

    2 people 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.