COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Cognos_Jan2017 on 14 Apr 2017 01:17:41 PM

Title: Layout Calculation to Concatenate Today's Date
Post by: Cognos_Jan2017 on 14 Apr 2017 01:17:41 PM
Running 10.2.2.

Would like to concatenate, in a Layout Calculation, of ...
'Most Recent Incident As Of ' + Current_Date

I know Current_Date has to be converted to a String, but how?  Cast, Extract, ... ?

TIA, Bob
Title: Re: Layout Calculation to Concatenate Today's Date
Post by: Cognos_Jan2017 on 17 Apr 2017 03:16:06 PM
Got this to work by adding a Block in upper left corner of Report, adding text ...
Most Recent Recordables By Location As Of ...

then a Layout Calculation directly under with ...
ReportDate()

Result ...
Most Recent Recordables By Location As Of ...
Apr 17, 2017 4:10:15 PM

Wasn't a single line concatenation in a Layout Calculation but it will work.
Title: Re: Layout Calculation to Concatenate Today's Date
Post by: BigChris on 18 Apr 2017 02:07:45 AM
You  don't need to specifically concatenate the two fields - you can just put a  text item into a block, then put a layout calculation (or a singleton for that matter) to the right of it.
Title: Re: Layout Calculation to Concatenate Today's Date
Post by: Cognos_Jan2017 on 18 Apr 2017 01:03:38 PM
Thank you BigChris.