Search code examples
reporting-servicesssrs-2012drillthrough

How to SSRS DrillThrough with multiple rows & multiple parameter


Hi currently i am doing a SSRS Report & i wanna make a drillthrough action

may i know how to make drillthrough depends on rows?

i had try like this & still not working

           =SWITCH(ROWNUMBER("ReportDetails")=1 ,"Jan"
           ROWNUMBER("ReportDetails")=2 ,"Feb")

my desired output

enter image description here

1 main table & 1 sub table

like if i clicked on the feb's amt then will drillthrough to the feb's details, if i click on jan's amt then will drillthrough to Jan's details


Solution

  • The basic process is as follows.

    Create a new report that accepts 'Month' as a parameter.

    The dataset should filter based on your parameter so it may look something like this...

    SELECT * FROM myDetailTable WHERE Month = @Month
    

    Test this is working by manully setting the parameter and once you are happy with it, go back to your main report.

    In the main report, right-click the cell that you want the user to click on to drill into your new report. This could be any textbox in the row, for exmaple the 'Amt' column. When you right-click, choose "textbox properties" then click on the "Action".

    In the Action dialog, select "Go to Report", select your new subreport (the one we created above) in the "Specify a report" drop-down.

    In the paramaters list, add a new parameter,

    In the "Name" column 'Month'

    In the value column, select the name of the dataset column that contains your month, for example [Month]

    That's pretty much all there is to it.