SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Passing MDX values to drill through report using MDX parameter


Passing MDX values to drill through report using MDX parameter

Author
Message
Suresh.Utham
Suresh.Utham
Old Hand
Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)

Group: General Forum Members
Points: 392 Visits: 216
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
Suresh.Utham
Suresh.Utham
Old Hand
Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)

Group: General Forum Members
Points: 392 Visits: 216
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
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27829 Visits: 13268
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?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search