COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: jcrouch on 06 Apr 2011 01:12:12 PM

Title: Insert HTML Item in an individual crosstab measure?
Post by: jcrouch on 06 Apr 2011 01:12:12 PM
Hi,

I have another Crosstab question :)

My crosstab has 3 measures. One of the measures I want to display as a link. In a list report I can just drag some HTML Items around the field and create my link.

But when I do this on my crosstab the HTML Item shows up next to all 3 measures. I looked deeper and it looks like all 3 measure columns are using the same 'text item' set to Cell Value. I tried deleting that out and using 3 different text items, one for each measure and it would not let me.

Is this possible to do?

Thanks,

Jeremy
Title: Re: Insert HTML Item in an individual crosstab measure?
Post by: melee on 06 Apr 2011 02:01:06 PM
I can't test this at the moment, but did you try concatenating the HTML into the data item? I'm not sure that it'll render, but it should...


'<a href="' + [Data Item1] + '">Linky!</a>'
Title: Re: Insert HTML Item in an individual crosstab measure?
Post by: jcrouch on 06 Apr 2011 03:40:25 PM
Thanks melee,

I think you mean to put the html code in the Data Item in the query itself?

I tried that and got some very odd results. It started adding 100's of columns to the report, probably one for each result... It was also using the HTML code for the column headers, so it may not render as you feared.

I will try out that technique on a simple list report and see if I can get that to work, then maybe scale it up to a crosstab.
Title: Re: Insert HTML Item in an individual crosstab measure?
Post by: squish88 on 07 Apr 2011 12:00:42 PM
You may have already tried this, but did you try unlocking the report and putting the HTML tags around just that measure?
Title: Re: Insert HTML Item in an individual crosstab measure?
Post by: jcrouch on 07 Apr 2011 01:07:03 PM
squish88,

Yep, tried that. When I drag the HTML next to the measure Cognos adds an HTML Item next to all 3 of my measures. Looking deeper I found that Cognos is using a single instance of a text box for all 3 measures :( And I could not find a way around that. If I just had 1 measure this would not be a problem and everything would work fine.

Thanks for looking :)