COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Cognos_Jan2017 on 20 Mar 2017 05:59:36 PM

Title: Known Issue Using COALESCE w/ Conditional Formatting?
Post by: Cognos_Jan2017 on 20 Mar 2017 05:59:36 PM
Am using a Query Calculation of ...
_days_between(cast(coalesce([IIMS - Business Layer].[Final Root Cause Statement].[Created Date],current_date),date),cast([IIMS - Business Layer].[General Incident Details].[Date Of Incident],date))

Tried a Boolean variable conditional formatting, but get a parsing error when running the Report.

Has anyone encountered this scenario?

TIA, Bob



Title: Re: Known Issue Using COALESCE w/ Conditional Formatting?
Post by: BigChris on 21 Mar 2017 03:01:13 AM
Have you broken that down into the constituent chunks to make sure each bit works. If you bring out the coalesce element on its own does it work?

coalesce([IIMS - Business Layer].[Final Root Cause Statement].[Created Date],current_date)
Title: Re: Known Issue Using COALESCE w/ Conditional Formatting?
Post by: Lynn on 21 Mar 2017 05:45:57 AM
Quote from: Cognos_Jan2017 on 20 Mar 2017 05:59:36 PM
Am using a Query Calculation of ...
_days_between(cast(coalesce([IIMS - Business Layer].[Final Root Cause Statement].[Created Date],current_date),date),cast([IIMS - Business Layer].[General Incident Details].[Date Of Incident],date))

Tried a Boolean variable conditional formatting, but get a parsing error when running the Report.

Has anyone encountered this scenario?

TIA, Bob

Are there any further error details? What is the data type of the created date?
Title: Re: Known Issue Using COALESCE w/ Conditional Formatting?
Post by: Cognos_Jan2017 on 21 Mar 2017 01:45:33 PM
I just tried Conditional Style, but got error ...
Invalid expression > 14. CRX-YXX-4010 A parsing error was found at or near the position 0 in the expression "> 14 ".

Details ...
XPath="./layouts/layout/reportPages/page[@name='Page1']/pageBody/contents/list[@name='List1']/listColumns/listColumn[16]/listColumnBody"
RSV-SRV-0042 Trace back:RSReportService.cpp(763): crxException: CCL_CAUGHT: RSReportService::processImpl()RSReportServiceMethod.cpp(259): crxException: CCL_RETHROW: RSReportServiceMethod::process(): asynchWait_RequestRSASyncExecutionThread.cpp(864): crxException: RSASyncExecutionThread::checkExceptionRSASyncExecutionThread.cpp(319): crxException: CCL_CAUGHT: RSASyncExecutionThread::runImpl(): promptPagingForward_RequestRSASyncExecutionThread.cpp(909): crxException: CCL_RETHROW: RSASyncExecutionThread::processCommand(): promptPagingForward_RequestExecution/RSRenderExecution.cpp(600): crxException: CCL_RETHROW: RSRenderExecution::executeAssembly/RSDocAssemblyDispatch.cpp(340): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSLayoutAssembly.cpp(79): crxException: CCL_RETHROW: RSLayoutAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(442): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchChildrenAssemblyForwardAssembly/RSReportPagesAssembly.cpp(185): crxException: CCL_RETHROW: RSReportPagesAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(384): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSPageAssembly.cpp(314): crxException: CCL_RETHROW: RSPageAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(384): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSTableRowAssembly.cpp(177): crxException: CCL_RETHROW: RSTableRowAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(384): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSTableCellAssembly.cpp(151): crxException: CCL_RETHROW: RSTableCellAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(442): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchChildrenAssemblyForwardAssembly/RSDocAssemblyDispatch.cpp(384): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSDocAssemblyDispatch.cpp(384): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSDocAssemblyDispatch.cpp(384): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSAssembly.cpp(529): crxException: CCL_RETHROW: RSAssembly::evaluateConditionsRom/RSConditionalExpression.cpp(253): crxException: CCL_THROW: RSConditionalExpression::evaluateExpression

     




     


Title: Re: Known Issue Using COALESCE w/ Conditional Formatting?
Post by: bdbits on 22 Mar 2017 09:33:22 AM
If you respond to the two people who have already asked you for particular information, you might get a response.
Title: Re: Known Issue Using COALESCE w/ Conditional Formatting?
Post by: Cognos_Jan2017 on 22 Mar 2017 12:48:53 PM
To bdbits, BigChris, and Lynn ...

Thank you bdbits.  I agree.

I replied to both BigChris and Lynn 0500 today about the Priority "Query Calculation" issue which had priority before a 1000 meeting w/ a VP toady.  I just got that resolved which needs another question, and must reply to them again.

The Coalesce is still under investigation, and I hope to provide more info later.
Title: Re: Known Issue Using COALESCE w/ Conditional Formatting?
Post by: Cognos_Jan2017 on 22 Mar 2017 02:51:41 PM
To bdbits, BigChris, and Lynn ...

The previous Cognos error was Corrected by ...

Removing the Query Calculation of ...
_days_between(cast(coalesce([IIMS - Business Layer].[Final Root Cause Statement].[Created Date],current_date),date),cast([IIMS - Business Layer].[General Incident Details].[Date Of Incident],date))

... and replacing it with ...
CASE
WHEN [IIMS - Business Layer].[Final Root Cause Statement].[Created By] is Null then (0)
ELSE (_days_between(cast([Final Root Cause Statement].[Created Date],date),cast([IIMS - Business Layer].[General Incident Details].[Date Of Incident],date)))
END

Have not applied Conditional Style yet, but will, and report results.
Title: Re: Known Issue Using COALESCE w/ Conditional Formatting?
Post by: Cognos_Jan2017 on 27 Mar 2017 04:39:41 PM
Sorry for the late reply.

Appolying a Conditional Style to the Report, after removing COALESCE, works fine.