Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Jump to Report in SRS 2000 possible? 1

Status
Not open for further replies.

dldev

Programmer
Sep 4, 2007
33
0
0
US
Hello, I've been researching this for some time. Does anyone know if you can conditionally jump to a report? Something like this:

=iif(Fields!TEST.Value = "?????" And Fields!TEST2.Value > 0, TestDetailReport, "")
I've tried this based on the text color also but keep getting errors like this:

The expression for the textbox ‘TESTBOX’ contains an error: [BC30451] Name 'TestDetailReport' is not declared.

Is what i'm trying to do here just not possible?

Thanks,
Dennis
 
You can certainly conditionally jump to a report but it must live in the same report folder as the current report. If not, all you need to do is use the "Jump To URL" and use a bit of url manipulation to point at the right folder and pass parameters through. I generally use a combination of code and formula to do this:
Code:
=iif( Parameters!OHType.Value = "Area",
[b]code.getURL[/b]("PandLHier_Outlet", Globals!ReportServerUrl, Globals!ReportFolder, Parameters!OHType.Value, Parameters!OH.Value, Fields!PaL_Line.Value,iif( Fields!OrderBy.Value =100,"PandL_Summary_Line","PandL_Detail_Line")),
[b]code.getURL[/b]("PandLHier", Globals!ReportServerUrl, Globals!ReportFolder, Parameters!OHType.Value, Parameters!OH.Value, Fields!PaL_Line.Value,iif( Fields!OrderBy.Value =100,"PandL_Summary_Line","PandL_Detail_Line")))
Code:
Public Shared Function [b]GetURL[/b](RPT, Server, Folder, OHType, OH, Line, LineType)

Dim URL

If instr(Line,"&")<>0 then
   Line = replace(Line,"&","%26")
end if

URL = Server & "?" & Folder & "/" & RPT & "&OHType=" & OHType & "&OH=" & OH & "&Line=" & Line & "&LineType=" & LineType & "&rc:Parameters=collapsed&rc:Toolbar=True"
return URL


End Function

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top