Crystal Reports and Hyperlinking

SavatageSavatage Member Posts: 7,142
edited 2006-10-12 in General Chat
This drove me crazy for a while so to help those who want to try it.

We send reports out that show a person's name and their tracking# for a specific package. Now nothing is better than just clicking on the tracking number and have everything else happen automatically.

First thing is Create a Formula Field Called Tracking.
Now you edit it an put some code or options but for this example lets say it's formula is
if ({Sales_Invoice_Header.Shipping Agent Code} = 'MAIL'
and {Sales_Invoice_Header.Ship-to Country Code} = 'US') then
"http://www.usps.com"
else
if ({Sales_Invoice_Header.Shipping Agent Code} = 'MAIL'
and {Sales_Invoice_Header.Ship-to Country Code} <> 'US') then
"http://www.upsmailinnovations.com&quot;
Else
{Sales_Invoice_Header.Tracking No_}
it can say "Hi Mom" if you want but this is the word that will contain the hyperlink

Now you drop the field in the report & right click & go to Format field.
The last tab says hyperlink
The type is "A website on the internet" as you can see you can pick others like emaill address(that's for another time).

Click the formula link in the Hyperlink info to add your code
http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=en_US&tracknum="+{Sales_Invoice_Header.Tracking No_}

in this case it's a link to UPS with our tracking number added to the the end.

Now when the report is run the link is set and if you export to pdf or something - the receiver can simply click the link (note I change the color to red for any hyperlinks) and they are there.

Have Fun!
Sign In or Register to comment.