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

Conditional Style against a date - how to create?

Started by cws196, 04 Dec 2014 01:37:02 PM

Previous topic - Next topic

cws196

I have a list report in Report Studio 8.4 that includes a date data-item.  The dates are format DD MMM YYYY and where DD = 15 I need the background colour of the cell to be highlighted as red.....however, I can't get it to work.

This is the first time I've done conditional styles so need some help, please.  I select 'New Conditional Style', select the data item and then assumed I would select 'String' (because it's not a range I want to select).  I then go to the 'New String Condition' icon and then select 'Enter String Criteria' and have selected various combination such as Operator:Contains and String:15 or Operator:Begins With and String:15 but these error.

Anyone know the correct way to do this, please?

Thanks-in-advance.

Lynn

I would use an advanced conditional style for this. Create a new expression something like this:

extract(day, [YourDate]) = 15

Set the conditional style for this case as desired and then leave the all other values case as it is.

I don't know if I got the syntax of the extract function exactly right or if it is the same for your DBMS, but if your date *really* is a date datatype then you should be able to use extract to isolate the day portion.

Casting to a string and then using substring is an option also, but messier.

I'm assuming you have a relational data source rather than a cube or DMR model, but if I'm wrong there then post back because my answer wouldn't apply to a non-relational source.