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

Navigating to alternate reports Expand / Collapse
Author
Message
Posted Tuesday, November 11, 2008 9:01 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, May 11, 2009 3:40 AM
Points: 20, 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
Post #600735
Posted Tuesday, November 11, 2008 9:26 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, December 18, 2014 6:40 AM
Points: 534, Visits: 1,043
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
Post #600754
Posted Tuesday, November 11, 2008 10:10 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, May 11, 2009 3:40 AM
Points: 20, 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
Post #600793
Posted Monday, November 17, 2008 12:49 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 12, 2014 6:04 PM
Points: 12, 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
Post #603879
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse