Author Topic: Known Issue Using COALESCE w/ Conditional Formatting?  (Read 214 times)

Offline Cognos_Jan2017

  • Full Member
  • ***
  • Join Date: Jan 2017
  • Posts: 44
  • Forum Citizenship: +0/-0
Known Issue Using COALESCE w/ Conditional Formatting?
« 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




Online BigChris

  • Statesman
  • ******
  • Join Date: Apr 2013
  • Posts: 963
  • Forum Citizenship: +75/-0
Re: Known Issue Using COALESCE w/ Conditional Formatting?
« Reply #1 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?

Code: [Select]
coalesce([IIMS - Business Layer].[Final Root Cause Statement].[Created Date],current_date)

Online Lynn

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 2,331
  • Forum Citizenship: +296/-1
Re: Known Issue Using COALESCE w/ Conditional Formatting?
« Reply #2 on: 21 Mar 2017 05:45:57 am »
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?

Offline Cognos_Jan2017

  • Full Member
  • ***
  • Join Date: Jan 2017
  • Posts: 44
  • Forum Citizenship: +0/-0
Re: Known Issue Using COALESCE w/ Conditional Formatting?
« Reply #3 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

     
 
 

 
     
 
 

Offline bdbits

  • Super Moderator
  • Statesman
  • ******
  • Join Date: Feb 2010
  • Posts: 1,702
  • Forum Citizenship: +97/-0
Re: Known Issue Using COALESCE w/ Conditional Formatting?
« Reply #4 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.

Offline Cognos_Jan2017

  • Full Member
  • ***
  • Join Date: Jan 2017
  • Posts: 44
  • Forum Citizenship: +0/-0
Re: Known Issue Using COALESCE w/ Conditional Formatting?
« Reply #5 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.

Offline Cognos_Jan2017

  • Full Member
  • ***
  • Join Date: Jan 2017
  • Posts: 44
  • Forum Citizenship: +0/-0
Re: Known Issue Using COALESCE w/ Conditional Formatting?
« Reply #6 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.

 



           
Twittear