If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Traffic-light-like indicator inside crosstable

Started by qvixote, 28 Apr 2015 10:08:40 AM

Previous topic - Next topic

qvixote

Hello!

A client asked me if there's a way of putting a traffic-light-like indicator as a column in a crosstable. It means he wants a column with a green spot if the value of another column is greater than X, and a red spot if not.

Is there a way to do something like that?

cognos810

Hello qvixote,
Yes you can do this. Drag and drop a crosstab space column with fact cells into your crosstab and then click on the intersection(measure) section for this column. Click on it and change the property for "Define contents" to yes. Then drag and drop your image(red,green,yellow traffic lights) and then conditionally show/hide/render based on the value of a measure intersection, which would go into your conditional variable's expression.

-Cognos810

qvixote

Thanks for your help, Cognos810!

I did what you propose, bu I'm failing in determine the proper wey to show/hide the images based on the value of the measure. I tried with "display variable" propertie, creating a boolean variable defined like this:

[Query1].[Cobertura] > 0,5

Where "Cobertura" is the measure I have to use, it's evaluating as false all the time.

cognos810

I did a mock up real quick, before I had responded to your message. Did not use display variable, but used render variable instead after inserting multiple images in the same intersection and it worked. Do you have any columns on the crosstab? Can you please attached your report xml here?

qvixote

Thanks again, Cognos810!

Here's atrached the xml of my report. I think I've used render variable too, but I'm not sure because I use report studio in spanish, so the property is called "Representar variable". I've tried, as I said before, with render variable, creating a boolean variable but it didn't work.

cognos810

Hi qvixote,
I see that the report variable has 0,2 instead of 0.2
Also, do not see any images in your crosstab and the rendering implementation of the same.

-Cognos810

Michael75

Hi qvixote,

Here's a short tutorial from YouTube which shows:
- conditional formatting of a measure in a crosstab
- conditional display of an image

https://www.youtube.com/watch?v=XutvYaoiXnc

It's not exactly what you are trying to achieve, but you should be able to combine the techniques shown here.

@ Cognos810 It's quite likely that qvixote has a comma defined as Decimal symbol in regional settings.

qvixote

Thanks a lot!

I'll try the last 2 recomendations and tell if it worked.

qvixote

Cognos810, as Michael75 said, I have comma defined as decimal symbol, because that's the regional setting in my country.

I've tried it again, now nos using decimal values, so I redefined the variable to:

[Consulta1].[Cobertura] < 1

and set one image to display when true and another to display when false. The second image is always shown, so I think the variable is always evaluating as false.

Attaches is the report with the modifications.