COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: intrepid402 on 16 Mar 2015 01:49:42 PM

Title: Excel email hyperlink
Post by: intrepid402 on 16 Mar 2015 01:49:42 PM
Hi folks!
Happy Monday :)

In my report, I have email ID where the business needs to be able to click on the email ID from report and open that in outlook.

I have the data item with class "Hyperlink" and have it coded this way:

'mailto:' + [Query].[Email]

It works great, except, when opened in excel, the users are able to click on null values and open outlook new email with nothing in the email. It works fine in HTML and PDF.

My answer would be: Excel is not supported in Cognos... so there is no fix for it. Anyone have any work around?

Thank you!
Title: Re: Excel email hyperlink
Post by: dfreed on 16 Mar 2015 02:57:03 PM
If you are using a hyperlink object, then you can modify the report expression of your URL source to only generate if there is data in the email address field. For instance:

If ([Query].[Email] <> '') then
('mailto:' + [Query].[Email])
else
('')

This should only generate the mail link if there is data in [Query].[Email]

-D
Title: Re: Excel email hyperlink
Post by: intrepid402 on 16 Mar 2015 03:19:40 PM
Ah! Thanks. I tried this before it didn't work because I didn't set the brackets correctly. It works now. Thanks!!