Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Passing MDX values to drill through report using MDX parameter Expand / Collapse
Author
Message
Posted Saturday, June 7, 2014 3:02 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, November 11, 2014 1:19 PM
Points: 354, Visits: 212
Hi,
I need to pass 2 parameters (which is coming from MDX dataset) into another report which again is using the MDX parameters to show detail report.

I'm using this expression in Go to URL... somehow the drill through report works while passing one parameter (Date.CalendarYear or Employee.UserName). But when I pass both Year and UserName, it assign the value to Year but UserName parameter is not getting the value assigned from main report.

="void(window.open('"+Variables!ReportServerUrl.Value+"/Pages/ReportViewer.aspx?"+Globals!ReportFolder+"/Test+Report&rs:Command=Render&Param1='+ escape('" + "[Date].[Year].[Year].&["+Fields!Realname.Value +"]'),',@Param2='+ escape('" + "[Employee].[Username].&["+Fields!Username.Value +"]'),'_blank'))"

PS: I'm using escape() since '&' in the unique value like [Date].[Year].&[2014] is throwing URL exceeds 260 chars error.

Plz can you check this and let me know if there's any issue with the expression.

Cheers!


Suresh
Post #1578605
Posted Sunday, June 15, 2014 4:53 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, November 11, 2014 1:19 PM
Points: 354, Visits: 212
I found the solution for this in another blog... Used replace(Param.value, "&[", "%2526[") instead of escape() and it worked

="void(window.open('"+Variables!ReportServerUrl.Value+"/Pages/ReportViewer.aspx?"+Globals!ReportFolder+"/Test+Report&rs:Command=Render&Param1='" + replace(Fields!Realname.Value, "&[", "%2526[") + "&Param2=" + replace(Fields!Username.Value, "&[", "%2526["),'_blank'))"


Suresh
Post #1580970
Posted Monday, June 16, 2014 12:02 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:28 AM
Points: 13,641, Visits: 11,517
Suresh.Utham (6/15/2014)
I found the solution for this in another blog... Used replace(Param.value, "&[", "%2526[") instead of escape() and it worked

="void(window.open('"+Variables!ReportServerUrl.Value+"/Pages/ReportViewer.aspx?"+Globals!ReportFolder+"/Test+Report&rs:Command=Render&Param1='" + replace(Fields!Realname.Value, "&[", "%2526[") + "&Param2=" + replace(Fields!Username.Value, "&[", "%2526["),'_blank'))"


Good that you found the solution and thanks for posting it here.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1580996
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse