COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: cognos05 on 27 Dec 2018 03:36:02 PM

Title: Adding an Image Item Next to Crosstab column
Post by: cognos05 on 27 Dec 2018 03:36:02 PM
I have a crosstab with produts in rows and few columns .

Next to growth column I am trying to add an image item so that it shows the icons based on growth .

I am unable to place the image item next to growth by unlocking the cells. It adds the image item to all the columns.

I am able to do this in the list control but not on crosstab . Not sure If I am doing anything wrong.

Any help is appreciated.

Title: Re: Adding an Image Item Next to Crosstab column
Post by: MFGF on 28 Dec 2018 04:37:12 AM
Quote from: cognos05 on 27 Dec 2018 03:36:02 PM
I have a crosstab with produts in rows and few columns .

Next to growth column I am trying to add an image item so that it shows the icons based on growth .

I am unable to place the image item next to growth by unlocking the cells. It adds the image item to all the columns.

I am able to do this in the list control but not on crosstab . Not sure If I am doing anything wrong.

Any help is appreciated.

Hi,

Can you elaborate on what "few columns" actually means? What has been dragged into the Columns area - a single item with a few different values, or a few separate items stacked next to each other?

If the latter, you can select just the Growth item (in the column header), then from the interactive toolbar, click on the ellipsis and choose "Select Member Fact Cells" - this will select just the cells that belong to the Growth item. You can then define a conditional style for these cells (in the Properties pane), and based on your condition display background images (from the Advanced tab) for the appropriate values.

Cheers!

MF.
Title: Re: Adding an Image Item Next to Crosstab column
Post by: cognos05 on 28 Dec 2018 07:20:32 AM
I have many columns like revenue , growth etc .

In growth column i need to append the image based on growth value along with growth %

But when I unlock the cells and try to drag an image item to only next to growth column  , it places the image in all other columns as well.

Thanks,
Title: Re: Adding an Image Item Next to Crosstab column
Post by: cognos05 on 28 Dec 2018 07:37:23 AM
I think i got it now. I have to do define contents as yes and then do the dragging.
Title: Re: Adding an Image Item Next to Crosstab column
Post by: cognos05 on 28 Dec 2018 08:33:32 AM
Unfortuantely this is not working . Image is not showing up .

STeps done .

Rows - having product line level
Columns - YTD, PYTD, Growth
Measure - Sales
      YTD   PYTD   Growth
p1   30     15        100%
p2   15     5           200%
p3    30   30          0

Now next to Growth I need to show an image

SO I am unlocking the cells and trying to add an image next to growth value , but it puts in all columns next to ytd, pytd as well.

so next follwed method .

CHose the growth column made the define contents to yes .

Now dragged growth data item back to the growth column and then dragged image ,now image is showing only next to growth .

Then in image  chose the type as data item value and added an data item which has an expression like
if(grwoth >0)
then image
else
image .

But after running only growth value is shown and no image dispalyed even for valid condition.


Title: Re: Adding an Image Item Next to Crosstab column
Post by: cognos05 on 28 Dec 2018 09:40:54 AM
I tried to put an image in the conditonal block rather than changing the back ground image of the condtional block and it worked.

But still not sure why I need to use an conditonal block instead I can just drag the image and link it to data item which check the condition and assigns the image.
Title: Re: Adding an Image Item Next to Crosstab column
Post by: MFGF on 28 Dec 2018 09:46:40 AM
Quote from: cognos05 on 28 Dec 2018 08:33:32 AM
Unfortuantely this is not working . Image is not showing up .

STeps done .

Rows - having product line level
Columns - YTD, PYTD, Growth
Measure - Sales
      YTD   PYTD   Growth
p1   30     15        100%
p2   15     5           200%
p3    30   30          0

Now next to Growth I need to show an image

SO I am unlocking the cells and trying to add an image next to growth value , but it puts in all columns next to ytd, pytd as well.

so next follwed method .

CHose the growth column made the define contents to yes .

Now dragged growth data item back to the growth column and then dragged image ,now image is showing only next to growth .

Then in image  chose the type as data item value and added an data item which has an expression like
if(grwoth >0)
then image
else
image .

But after running only growth value is shown and no image dispalyed even for valid condition.

Hi,

You seem to have completely ignored the advice I gave above and done your own thing? I just tested the approach I outlined, using the sample GO Sales (Query) package, and this was the result:

(https://i.ibb.co/ysBr4Fg/Conditional-Images.png)

This looks to me like the solution you were asking for?

MF.
Title: Re: Adding an Image Item Next to Crosstab column
Post by: cognos05 on 28 Dec 2018 10:48:13 AM

Thanks for taking time to show this .

Sorry , I think i read faster . I tried your approach now  and works well . Its like much easier rather than adding a conditonal block putting an image .

Here directly i can set the back ground based on condition .

One question is what is the position of your image in the below screnshot  there are 3 rows 3 columns selection  . I want it like the one in your screenshot . Is it center right ?

Also i need like red green and yellow arrows as in excel , where can i download those images,its not in cognos images path .
Title: Re: Adding an Image Item Next to Crosstab column
Post by: cognos05 on 02 Jan 2019 01:42:07 PM
Hi MFGF,

when i run the report as run as excel , I dont see the back ground image in the excel file . it shows only in html .

Any reason why this is not happening.