May 11, 2010 at 9:11 am
Anyone have any luck getting a conditional hyperlink to work?
=IIF(Fields!structID.Value > 0,"Report1","")
In otherwords, allow the hyperlink, otherwise no hyperlink.
Thanks.
John
John A. Byrnes
May 11, 2010 at 8:58 pm
Hi ,
In general to navigate to a report using hyper link,
Rigth Click the cell-->Property-->Navigation . In the Jump to URL section give the expression as
=void window.open('"+Globals!ReportServerUrl+"?"+Globals!ReportFolder+"/"+"Sub&rs:command=render&rc:Parameters=false&sd="+Parameters!sd.Value.ToString()+"')"
here Sub is the report to which I want to navigate and sd is the parameter for this report(which Im passing from the main report)
If you want to apply condition you can give it like this:
=iif(Fields!structID.Value > 0,"void window.open('"+Globals!ReportServerUrl+"?"+Globals!ReportFolder+"/"+"Sub&rs:command=render&rc:Parameters=false&sd="+Parameters!sd.Value.ToString()+"')",0)
After this deploy the report and try navigation in the Report Server, I think in BIDS navigation wont work.
Thanks & Regards,
MC
May 14, 2010 at 11:01 am
If you are just jumping to another report and Report1 is the report name then you just need to fix up your code replacing the empty string with Nothing:
=IIF(Fields!structID.Value > 0,"Report1",Nothing)
You also might want to do some conditional formatting based on if it is a hyperlink or not. To make the hyperlinks underlined and blue:
In the Properties --> Font --> Decoration setting
=IIF(Fields!structID.Value > 0,"Underline","None")
Color settings
=IIF(Fields!structID.Value > 0,"Blue","Black")
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply