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

Embed Hyperlink in Impromptu

Status
Not open for further replies.

CptTom

Programmer
Jul 16, 2001
117
US
I am trying to embed a dynamic hyperlink that will take a value from the IWR (WorkOrderNumber) and pass it as a variable to a hyperlink. Based on Cognos' Knowledge Base, I should have a calculated field with something like (assuming that this whole thing is a Value/String)

If (char_length(WO)>1) Then ('<html><a href = ' + (WO) + '</a>'')

That is my interpretation of the below instructions. But when I run it and save as PDF, there is no Hyperlink. The above is simply text in that field. I have tried numerous variations and gotten nothing but frustration.

Within the Report select Query ->Data
Select Project_id and click the calculator button.
In the Calculation Definition create an if then else statement to the effect of:
if project_id = 10 then ('<html><a href="Repeat for desired values.

Run the report -> File -> Save As -> PDF you will see the hyperlink(s).
 
Should this:
<a
be this:
<a>

Pain is stress leaving the body.

DoubleD [bigcheeks]
 
Cognos' Knowledge Base has 2 examples and both have </a> at the end. I tried your idea and it still did not work.
 
Here is how it needs to be written:

If (char_length(WO)>1) Then ('<html><a href = " + (WO) + '</a>')

Notice the following issues:
1. You are concatenating a string, a field, and another string.
2. You need to use Quotation Marks around your website, not apostrophes.


Pain is stress leaving the body.

DoubleD [bigcheeks]
 
Here is how we solved the problem.

We created 2 catalog calculations at the folder level.
The first one was the begin tag
['<html><a href = "Ourserver/website/DWH_WO_Detail.cfm?WO=']
The second was the end tag
['"Name</a>']

We then went to the IMR and made the field
If (xxxx) then (BeginTag + (WO) + EndTag) Else blah blah

This worked.

Using this technique we can accomplish a lot. Thanks for your assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top