I’ve a list which has a column ‘YEAR’. I want to make the recent year(2010) appear bold in that ‘YEAR’ column. I tried this expression
IF ( [myQuery].[YEAR] = [myQuery].[RECENT_YEAR]) THEN
( "RecentYearBold" )
where [RECENT_YEAR] is a DataItem with the expression maximum([YEAR])
This throws me an error and it doesn’t allow me to use the DataItem in conditional variable expression. Can anybody help?
Error I get:
RSV-VAL-0002 Invalid expression IF ( [myQuery].[YEAR] = [myQuery].[RECENT_YEAR] ) THEN
( “RecentYearBold” ). CRX-API-0005 An error on or around the position ’34’. The variable named ‘[myQuery].[RECENT_YEAR]’ is invalid.
I was able to accomplish what you are trying (after getting the same error you did) by taking the following approach:
maximum ([cognos_test].[year] for report). (You could use a different scope, if desired.)recent yearwith the following expression:[Query1].[year] = [Query1].[recent_year]recent yearand applied the conditional bold formatting to the year column whenrecent year = true[Query1].[recent_year]field needed to be in the list as well. When I added it to the list, the conditional formatting worked. (Really not sure why this was the case, but I went with it.)[recent_year]column (while still leaving it in the list) you can set the “Box Type” property for the “List Column Body” and “List Column Title” objects for the recent_year column to “None”.