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

Change Colour Of Data On Condition !

Started by mohsin2010, 19 Jan 2011 12:11:24 AM

Previous topic - Next topic

mohsin2010

Hi,

   i want to show the report having three columns First Name,Last Name,Salary and want to make a condition on salary column that the person whose salary is less then 6000 then its salary would be written in Red colour??

Thanks in Advance,

Mohsin

PRIT AMRIT

Create a Boolean variable:

[Salary]<6000

Associate the variable with the salary Column. In the Conditional explorer,
Click Yes, then in properties change the background color to 'Red'

Thanks
P

mohsin2010

PRIT,

   i knew that we have to use the variable for the salary column but what should we write in the condition column that if salary <6000 then .. .
      How do i write for changing the "Text colour of Salary Column" ??

Regards,

Mohsin


PRIT AMRIT

Unlock first, then click on the 'Text' then apply the variable and change the color conditionally....

mohsin2010

PRIT,

in boolean variable  name "Text"  i give condition like

(IF ( [Query1].[SALARY]<6000 ) THEN
    ( 'Yes' )
ELSE
    ( 'No' ))

but how do this condition would know o change the text color of Salary ???

Thanks,

Mohsin


PRIT AMRIT

Not sure what u want though, find attached XML and let me know if this is your requirement?

mohsin2010

i do not get through XML file ...  . .i told you that i want to change the color of data of salary on the condition if salary is less then 6000 then it will be written in red color otherwise it would be in black color like,

FIRST_NAME        LAST_NAME          SALARY
  JOHN                  ANDERSON            8000
  PEIT                     KHALI                5000

now for this condition what shoul i do to my condition in the previous post  ??? 

Thnaks,

Mohsin

ksr

no need to use if .... else construct in the case of boolean variable..you can directly write the expression as [salary]<6000
steps:
1) go to condition explorer
2) drag boolean variable from tool box to variable folder then you will get expression dialogue box, build the expression by taking your salary query item
it would lokk like [salary]<6000
3) validate it and click OK, you will return to condition explorer
4) go to page explorer, clik on salary column, under properties assign "boolean1" to style varible property
5) go to conditional explorer, you will see values like YES, NO...
just select YES, then the page explorer will turn into green colour
now in the properties pane, select foreground color proerty, select RED colour
6) double click the "page explorer" to turn off the green colour

just run the report.

regards
KSR


PRIT AMRIT


mohsin2010

Ksr,

   yup i have got it thanks for helping me .. ..


PRIT,

   you too also i got from your attachment ... .thanks :)


Best Regards,
Mohsin