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


Navigating to alternate reports


Navigating to alternate reports

Author
Message
david.buncle
david.buncle
SSC-Enthusiastic
SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)

Group: General Forum Members
Points: 144 Visits: 62
Hi.
I was just wondering whether it's possible, using SQL Server 2000 Reporting Services, to change which report to navigate to depending on the value of a certain field. I refer to the 'Action' property of a field where you can set what report (or url) to navigate to when a field is clicked.

So, for example,
If the value of a field is 1, navigate to an existing report called 'Report 1'
If the value of a field is 2, navigate to an existing report called 'Report 2'
.. and so on.

Can I do this using an expression in the 'Jump to report' option of the 'Action' property?..

Thanks.
Dave
dva2007
dva2007
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1782 Visits: 1112
Yes it is possible.

=iif(Parameters!name.Value = "VVV", "Report_1", "Report_2")

Assume that you have two report Report_1 and Report_2 and Report_1 populates if your name parameter is VVV otherwise it will populate Report_2.

Regards,
vijay
david.buncle
david.buncle
SSC-Enthusiastic
SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)SSC-Enthusiastic (144 reputation)

Group: General Forum Members
Points: 144 Visits: 62
Nice, thanks for that. One more thing... what syntax do I use to pass a parameter to the report I'm navigating to (when using an expression like below)? I've tried a few combinations but all I get is compilation errors. Say I wanted to pass p1.value to "Report_1" or "Report_2".

=iif(Parameters!name.Value = "VVV", "Report_1", "Report_2")

Thanks again for you help.
Dave
stan.goodvibes
stan.goodvibes
SSC-Enthusiastic
SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)SSC-Enthusiastic (122 reputation)

Group: General Forum Members
Points: 122 Visits: 78
Grasshopper, heres the navigation string from one of my linked subreports ('ShowVRDetail' with parameter 'ApptID') ....

="void(window.open('http://reports/ReportServer?" & Globals!ReportFolder & "%2fShowVRDetail&rs:Command=Render&ApptID=" & Fields!AppointmentID.Value & "'))"

Note: this opens the subreport in a new pop-up window, I prefer that than the user having to hit the back key to go back to the main report - this way they can open as many subreports as they like in new ie windows.

Use the Globals.ReportFolder global so your subreport runs from any directory (i.e. reports/Test and reports/Production).

If you want to call different reports depending on the param the user picked you can go...

="void(window.open('http://reports/ReportServer?" & Globals!ReportFolder & "%2f" & IIF(MyParam = value, "Report1","Report2") & "&rs:Command=Render&ApptID=" & Fields!AppointmentID.Value & "'))"

That should work (haven't tried it myself).

Hope that helps
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