Home > OS >  Reset the parameter in SSRS after operated an action?
Reset the parameter in SSRS after operated an action?

Time:02-02

I have 2 SSRS reports that have been deployed to the report server.

Report 1 has action that allows the user to open a new window for Report 2.

Below is the example of my Report 1.

Department Success Count Failure Count Running Count
Department 1 10 2 25
Department 2 18 5 12

Report 2 is a drilldown report that shows all the details within that department.

The idea is when I click Department 1, it will show all Success/Failure/Running data within department 1

And when I click the number under the specific catalog, it will only shows the corresponding data.

For eg: If I click 10 on the first row under Success, it will only shows the department 1 with success data.

What happening right now is when I click 10, it did show the success data within department 1,

However, If I click department 1 again, it still shows the department 1 with success.

(if I click department2, it would shows department 2 with success)

So my assumption is the parameter is not reset when I click the first column.

How do I reset my parameter on my SSRS?

I hope my explanation is clear enough to understand, if you need more visual explanation, I can paste here.

Edit: Attachment 1 Dataset for Drilldown Report 2

SELECT *  FROM [DASHBOARD].[dbo].[ENTERPRISE_LOGGING_SUMMARY]
WHERE [DEPARTMENT] = @DEPARTMENT AND 
TYPE1 = @TYPE AND
STATE =@State

Attachment 2 Action for Department column

       ="javascript:void window.open('" & Globals!ReportServerUrl
     & "/reportserver?" & Globals!ReportFolder & "/DrillDownReport&TYPE="&Fields!TYPE1.Value 
& "&DEPARTMENT=" &Fields!DEPARTMENT.Value & "','_blank','width=1500,height=750,scrollbars=yes,resizable=yes,toolbar=no,status=no,menu=no,top=20,left=15')"

Attachment 3 Action for STATE(Success/Failure/Running)

="javascript:void window.open('" & Globals!ReportServerUrl
 & "/reportserver?" & Globals!ReportFolder & "/DrillDownReport&rs:Command=Render&TYPE="&Fields!TYPE1.Value & 
 "&DEPARTMENT=" &Fields!DEPARTMENT.Value & 
 "&State=" & Fields!STATE.Value &"&rs:Command=Render','_blank','width=1500,height=750,scrollbars=yes,resizable=yes,toolbar=no,status=no,menu=no,top=20,left=15')" 

CodePudding user response:

I'm guessing you drill down report only takes single values for parameters.

It looks like the department action is not sending the state parameter. So you could try setting it with something like

 ="javascript:void window.open('" & Globals!ReportServerUrl
     & "/reportserver?" & Globals!ReportFolder & "/DrillDownReport&TYPE="&Fields!TYPE1.Value 
& "&DEPARTMENT=" &Fields!DEPARTMENT.Value &     
& "&State=all" & "','_blank','width=1500,height=750,scrollbars=yes,resizable=yes,toolbar=no,status=no,menu=no,top=20,left=15')"

Then update the dataset query to something like this

SELECT *  FROM [DASHBOARD].[dbo].[ENTERPRISE_LOGGING_SUMMARY]
WHERE [DEPARTMENT] = @DEPARTMENT
AND TYPE1 = @TYPE 
AND (STATE =@State OR @State = 'all')
  • Related