Friday, March 30, 2012

Jump to URL - Base URL portion

I need to make the hyperlink from the report based on the current virtual direcrory.

If I do not havehttp://server/virtualdirectory/ in the expression, it will not make it hyperlink.

But if I hard code it, when I move to production I will need to change it.

I can make it a parameter and fill it in the load but I am looking for a code solution that will make it smart to know where the report is running from.

Any one?

Begin you hyperlink with ~ (tilde) character and then /. It will be replaced with Virtual directory name by ASP.net at runtime. for ex: in your case you can refer to http://server/virtualdirectory/test.aspx with ~/test.aspx.|||

I put in the navigation tab in jump to URL: the expresion

="~/OTDByFamilyPlant.aspx?FromDate=" & Parameters!FromDate.Value &"&ToDate=" & Parameters!ToDate.Value &"&FamilyID=" & Fields!Customer_Family_ID.Value

it did not even change the cursor to a hand.

Do I need to do something else?

|||Please note that you can't resolve this URL in browser navigation bar, as the URL starting with ~ will be resolved at the server end by ASP.NET. If you use any URL that starts with ~/ in for server controls in ASPX pages, it will be resolved at the server end as corresponding virtual directory.

Hope I am clear.|||

Not clear at all.

I was looking for a solution to show hyperlinks in a report based on the current virtual directory.

You suggested to use ~/ as a placeholder that will do the trick.

It did not!

What do I do in a report?

Is there a command solution?

No comments:

Post a Comment