Topic
  • 4 replies
  • Latest Post - ‏2012-09-27T15:18:30Z by CuriousGirl
CuriousGirl
CuriousGirl
9 Posts

Pinned topic Cognos 10.1.1 Creating a new Data Item in Report Studio

‏2012-09-26T20:40:43Z |
I am creating a report to track reward points for new orders. I am trying to flag items that have no sales for the fiscal period 201101 through 201106. I am trying to do this by creating the following Data Item.

case
when Invoiced Qty < 1 and Fiscal Period between 201101 and 201106
then "reward"
end

I have tried to search for Invoiced Qty = 0 or Invoiced Qty = null. Invoiced Qty and Fiscal Period are both decimal fields. I am getting a parsing error in column 96 which is after the End. I am getting the following error:
QE-DEF-0260

Parsing error before or near position: 96 of: "case when Invoiced Qty < 1 and Fiscal Period between 201101 and 201106 then "reward" end"
Updated on 2012-09-27T15:18:30Z at 2012-09-27T15:18:30Z by CuriousGirl
  • SystemAdmin
    SystemAdmin
    1959 Posts

    Re: Cognos 10.1.1 Creating a new Data Item in Report Studio

    ‏2012-09-26T20:56:58Z  
    Looking at the expression it might be that you are using double quotes around the word "reward". Typically, single quotes would be used to denote string values. This is just a guess though because the forums tend to muck about with expressions so I'm not sure exactly where position 96 would be in your expression (using the "code" tags in your posts will help to preserve the expressions in their original format). You might try:

    
    CASE WHEN ([Invoiced Qty] < 1 and [Fiscal Period] between 201101 and 201106) THEN (
    'reward') END
    


    On the other hand it would also help if you could include the rest of the error message. Normally there is a "Details" link when an error is displayed which expands a box to show more detailed information about an error message. If this is available then it would be good to attach the full message to your post (as a text attachment because they can get somewhat lengthy). Likewise, attaching your report specification would also be a good way to look at how the expression is being used in your report.
  • CuriousGirl
    CuriousGirl
    9 Posts

    Re: Cognos 10.1.1 Creating a new Data Item in Report Studio

    ‏2012-09-27T12:48:06Z  
    Looking at the expression it might be that you are using double quotes around the word "reward". Typically, single quotes would be used to denote string values. This is just a guess though because the forums tend to muck about with expressions so I'm not sure exactly where position 96 would be in your expression (using the "code" tags in your posts will help to preserve the expressions in their original format). You might try:

    <pre class="jive-pre"> CASE WHEN ([Invoiced Qty] < 1 and [Fiscal Period] between 201101 and 201106) THEN ( 'reward') END </pre>

    On the other hand it would also help if you could include the rest of the error message. Normally there is a "Details" link when an error is displayed which expands a box to show more detailed information about an error message. If this is available then it would be good to attach the full message to your post (as a text attachment because they can get somewhat lengthy). Likewise, attaching your report specification would also be a good way to look at how the expression is being used in your report.
    Thank you for taking the time to reply and telling me what would be helpful to attach. This is my first forum posting, so I am very green. I have made notes and will be more thorough next time.

    I tried the change you suggested, but that did not fix my issue. I have attached the report specification. The error is in or near position 82 which is the space right in front of ('reward'). It would only allow me to attach one file, so here are the error details:
    QE-DEF-0260

    Parsing error before or near position: 82 of: "case when Invoiced Qty < 1 and Fiscal Period between 201101 and 201106 then"

    Details
    QE-DEF-0261 QFWP - Parsing text: case when Invoiced Qty < 1 and Fiscal Period between 201101 and 201106 thenQE-DEF-0260 Parsing error before or near position: 82 of: "case when Invoiced Qty < 1 and Fiscal Period between 201101 and 201106 then"QE-DEF-0261 QFWP - Parsing text: case when Invoiced Qty < 1 and Fiscal Period between 201101 and 201106 thenRSV-SRV-0042 Trace back:RSReportService.cpp(722): QFException: CCL_CAUGHT: RSReportService::process()RSReportServiceMethod.cpp(263): QFException: CCL_RETHROW: RSReportServiceMethod::process(): asynchRunSpecification_RequestRSASyncExecutionThread.cpp(808): QFException: RSASyncExecutionThread::checkExceptionRSASyncExecutionThread.cpp(260): QFException: CCL_CAUGHT: RSASyncExecutionThread::runImpl(): asynchRunSpecification_RequestRSASyncExecutionThread.cpp(864): QFException: CCL_RETHROW: RSASyncExecutionThread::processCommand(): asynchRunSpecification_RequestRSQueryMgr.cpp(1569): QFException: CCL_RETHROW: RSQueryMgr::executeRsapiCommandRSQueryMgr.cpp(1559): QFException: CCL_RETHROW: RSQueryMgr::executeRsapiCommandRSQueryMgr.cpp(1549): QFException: CCL_RETHROW: RSQueryMgr::executeRsapiCommandQFSSession.cpp(1147): QFException: CCL_RETHROW: QFSSession::ProcessDoRequest()QFSSession.cpp(1145): QFException: CCL_CAUGHT: QFSSession::ProcessDoRequest()QFSSession.cpp(1102): QFException: CCL_RETHROW: QFSSession::ProcessDoRequest()QFSSession.cpp(1078): QFException: CCL_RETHROW: QFSSession::ProcessDoRequest()QFSConnection.cpp(839): QFException: CCL_RETHROW: QFSConnection::GetParametersQFSQuery.cpp(390): QFException: CCL_RETHROW: QFSQuery::GetParametersCoordinationQFSQuery.cpp(4708): QFException: CCL_THROW: CoordinationQFSQuery::RectifyMandatoryParameters
  • SystemAdmin
    SystemAdmin
    1959 Posts

    Re: Cognos 10.1.1 Creating a new Data Item in Report Studio

    ‏2012-09-27T13:07:04Z  
    Thank you for taking the time to reply and telling me what would be helpful to attach. This is my first forum posting, so I am very green. I have made notes and will be more thorough next time.

    I tried the change you suggested, but that did not fix my issue. I have attached the report specification. The error is in or near position 82 which is the space right in front of ('reward'). It would only allow me to attach one file, so here are the error details:
    QE-DEF-0260

    Parsing error before or near position: 82 of: "case when Invoiced Qty < 1 and Fiscal Period between 201101 and 201106 then"

    Details
    QE-DEF-0261 QFWP - Parsing text: case when Invoiced Qty < 1 and Fiscal Period between 201101 and 201106 thenQE-DEF-0260 Parsing error before or near position: 82 of: "case when Invoiced Qty < 1 and Fiscal Period between 201101 and 201106 then"QE-DEF-0261 QFWP - Parsing text: case when Invoiced Qty < 1 and Fiscal Period between 201101 and 201106 thenRSV-SRV-0042 Trace back:RSReportService.cpp(722): QFException: CCL_CAUGHT: RSReportService::process()RSReportServiceMethod.cpp(263): QFException: CCL_RETHROW: RSReportServiceMethod::process(): asynchRunSpecification_RequestRSASyncExecutionThread.cpp(808): QFException: RSASyncExecutionThread::checkExceptionRSASyncExecutionThread.cpp(260): QFException: CCL_CAUGHT: RSASyncExecutionThread::runImpl(): asynchRunSpecification_RequestRSASyncExecutionThread.cpp(864): QFException: CCL_RETHROW: RSASyncExecutionThread::processCommand(): asynchRunSpecification_RequestRSQueryMgr.cpp(1569): QFException: CCL_RETHROW: RSQueryMgr::executeRsapiCommandRSQueryMgr.cpp(1559): QFException: CCL_RETHROW: RSQueryMgr::executeRsapiCommandRSQueryMgr.cpp(1549): QFException: CCL_RETHROW: RSQueryMgr::executeRsapiCommandQFSSession.cpp(1147): QFException: CCL_RETHROW: QFSSession::ProcessDoRequest()QFSSession.cpp(1145): QFException: CCL_CAUGHT: QFSSession::ProcessDoRequest()QFSSession.cpp(1102): QFException: CCL_RETHROW: QFSSession::ProcessDoRequest()QFSSession.cpp(1078): QFException: CCL_RETHROW: QFSSession::ProcessDoRequest()QFSConnection.cpp(839): QFException: CCL_RETHROW: QFSConnection::GetParametersQFSQuery.cpp(390): QFException: CCL_RETHROW: QFSQuery::GetParametersCoordinationQFSQuery.cpp(4708): QFException: CCL_THROW: CoordinationQFSQuery::RectifyMandatoryParameters
    check the detail filter that was incorrect.

    Invoiced Qty < 1 and Fiscal Period between 201101 and 201106
  • CuriousGirl
    CuriousGirl
    9 Posts

    Re: Cognos 10.1.1 Creating a new Data Item in Report Studio

    ‏2012-09-27T15:18:30Z  
    check the detail filter that was incorrect.

    Invoiced Qty < 1 and Fiscal Period between 201101 and 201106
    Thank you Winson11. Deleting the detail filter got rid of the error message, but the Data Item (Eligibility) still does not work. I started out trying to pull the data with the filter and then switched to flagging the lines because the user wants to see all the data.