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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relative path for Hyperlinks.

Status
Not open for further replies.

pankajv

Programmer
Jan 30, 2002
178
0
0
IN
We have a requirement where we need to display, 3 type of information, which are not related to each other in such a way that the user is able to navigate(first page of the other section) to another set by clicking some link or something. We decided to acheive this in following way:
1. Create 3 different reports.
2. In each report have hyperlinks to the other 2 reports and disable the link for the current report.
3. Pass the parameters of the current report to the other report in the hyperlink. (Parameters for all the reports are same).

I am not sure wheteher this is a good way of doing things or not, but because of the time constraints we decided to follow this approach.

Now the problem is that, we need to specify the server name and the virtual directory name in each link. All the reports will reside in the same folder. Is there a way by which we can use relative path to access the report.

We are using Crystal 8.0 and using WCS to display the reports on the browsers.

Thanks,
Pankaj
 
You can use an alias for your link.

Just specify and combine the relative path with your actual path on your wcs, and reference the relative path in the hyperlinks.

Naith
 
Could you please tell me how to give an alias. An example would of great help.

Thanks,
Pankaj
 
What I'm presuming you're trying to get to is this:

http:\\MyLinkAlias\MyReportID\MyParameterValues

to act as this:

http:\\My\Full\Path\Path\Path\MyReportID\MyParameterValues

You can do this by adding your alias to your DNS server. You can assign multiple IP names to the same IP address. Simply resolve the aliasname to your actual path, and the next time your browser tries to resolve your hyperlink, it'll pick up the correct value from your new DNS entry.

Your network guys, or sys admin should be able to do this for you.

Naith
 
No. I am not trying to do this.

Let me explain this a bit more. Let's say have 3 folders, Main, ASPs and Reports. Main folder contains ASPs and Reports folder and is made as a virual directory let say "TSP". Now if the user wants to access any ASP page he/she has to type in the URL as
Now if the user is on one asp page and wants to view a Report then what we do we use the relative path to show the report like "../Reports/ReportName.rpt". This displays the report on the browser. So if we view the URL for the report it shows now If this report has a hyperlink then can I use the relative path like I did to reach the report from the ASP page.

I hope I am making sense.

Thanks,
Pankaj
 
From what you've described, this is exactly as a hyperlink is able to work.

Consider a hyperlink property of:

" + "&promptex0=" + '%22' + {@Field1} + '%22' + "&promptex1=" + '%22' + StringVar Array Sn[1] + '%22' + "&promptex2=" + '%22' + {?Parameter1} + '%22' + "&promptex3=" + '%22'

"YourCrystalAlias" represents your servername and other details on your dns server. The bits from promptex0 onwards depend on whether you want to pass values to the report.
The above is an Enterprise example, but if you don't have Crystal Enterprise, the principle is still the same.

If there are numerous links on each report, you might find it easier to manage your relative path in a single formula on each report, and call the formula in your links. This makes future maintenance a lot easier.

Naith
 
I got what you are saying.

Thanks for all the help.
Pankaj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top