title: Cognos error RSV-SRV-0040
body: <p>Before I go into what i'm doing, here is the error message i'm getting.</p>
  
  <blockquote>
    <p>The report server encountered an internal error. Check additional
    information associated with this error message. If cause of problem
    cannot be ascertained, increase the logging level in the IBM Cognos
    administration tool and reproduce the conditions that caused the
    error. If the problem persists, see the problem determination
    information on the IBM Cognos Support Portal page at
    <a href="http://www-947.ibm.com/support/entry/portal/Overview/Software/Information_Management/Cognos_Business_Intelligence" rel="nofollow">http://www-947.ibm.com/support/entry/portal/Overview/Software/Information_Management/Cognos_Business_Intelligence</a>.</p>
  </blockquote>
  
  <p>Here is the detail:</p>
  
  <blockquote>
    <p>CCLAssertError:0:Fatal: CCL_ASSERT(gw!=NULL);RSV-SRV-0042 Trace
    back:RSReportService.cpp(762): CCLAssertError: CCL_CAUGHT:
    RSReportService::process()RSReportServiceMethod.cpp(263):
    CCLAssertError: CCL_RETHROW: RSReportServiceMethod::process():
    asynchWait_RequestRSASyncExecutionThread.cpp(808): CCLAssertError:
    RSASyncExecutionThread::checkExceptionRSASyncExecutionThread.cpp(260):
    CCLAssertError: CCL_CAUGHT: RSASyncExecutionThread::runImpl():
    promptPagingForward_RequestRSASyncExecutionThread.cpp(864):
    CCLAssertError: CCL_RETHROW: RSASyncExecutionThread::processCommand():
    promptPagingForward_RequestExecution/RSRenderExecution.cpp(670):
    CCLAssertError: CCL_RETHROW:
    RSRenderExecution::executeAssembly/RSDocAssemblyDispatch.cpp(291):
    CCLAssertError: CCL_RETHROW:
    RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSLayoutAssembly.cpp(79):
    CCLAssertError: CCL_RETHROW:
    RSLayoutAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(358):
    CCLAssertError: CCL_RETHROW:
    RSDocAssemblyDispatch::dispatchChildrenAssemblyForwardAssembly/RSReportPagesAssembly.cpp(179):
    CCLAssertError: CCL_RETHROW:
    RSReportPagesAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(308):
    CCLAssertError: CCL_RETHROW:
    RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSPageAssembly.cpp(303):
    CCLAssertError: CCL_RETHROW:
    RSPageAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(308):
    CCLAssertError: CCL_RETHROW:
    RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSTableRowAssembly.cpp(177):
    CCLAssertError: CCL_RETHROW:
    RSTableRowAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(308):
    CCLAssertError: CCL_RETHROW:
    RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSTableCellAssembly.cpp(137):
    CCLAssertError: CCL_RETHROW:
    RSTableCellAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(358):
    CCLAssertError: CCL_RETHROW:
    RSDocAssemblyDispatch::dispatchChildrenAssemblyForwardAssembly/RSTableAssembly.cpp(119):
    CCLAssertError: CCL_RETHROW:
    RSTableAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(358):
    CCLAssertError: CCL_RETHROW:
    RSDocAssemblyDispatch::dispatchChildrenAssemblyForwardAssembly/RSTableRowAssembly.cpp(177):
    CCLAssertError: CCL_RETHROW:
    RSTableRowAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(308):
    CCLAssertError: CCL_RETHROW:
    RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSTableCellAssembly.cpp(137):
    CCLAssertError: CCL_RETHROW:
    RSTableCellAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(358):
    CCLAssertError: CCL_RETHROW:
    RSDocAssemblyDispatch::dispatchChildrenAssemblyForwardAssembly/RSDocAssemblyDispatch.cpp(308):
    CCLAssertError: CCL_RETHROW:
    RSDocAssemblyDispatch::dispatchAssemblyRSQueryMgr.cpp(1131):
    CCLAssertError: CCL_RETHROW:
    RSQueryMgr::getResultSetIteratorRSQueryMgr.cpp(1295): CCLAssertError:
    CCL_RETHROW: RSQueryMgr::createIteratorRSQueryMgr.cpp(1569):
    CCLAssertError: CCL_RETHROW:
    RSQueryMgr::executeRsapiCommandRSQueryMgrExecutionHandlerImpl.cpp(168):
    CCLAssertError: CCL_RETHROW:
    RSQueryMgrExecutionHandlerImpl::execute()QFSSession.cpp(1153):
    CCLAssertError: CCL_RETHROW:
    QFSSession::ProcessDoRequest()QFSSession.cpp(1151): CCLAssertError:
    CCL_CAUGHT: QFSSession::ProcessDoRequest()QFSSession.cpp(1102):
    CCLAssertError: CCL_RETHROW:
    QFSSession::ProcessDoRequest()QFSConnection.cpp(788): CCLAssertError:
    CCL_RETHROW: QFSConnection::ExecuteQFSQuery.cpp(213): CCLAssertError:
    CCL_RETHROW: QFSQuery::Execute v2CoordinationQFSQuery.cpp(2024):
    CCLAssertError: CCL_RETHROW: QEQFSQuery.cpp(148): CCLAssertError:
    CCL_RETHROW: QFSQuery::PrepareQFSQuery.cpp(148): CCLAssertError:
    CCL_RETHROW: QFSQuery::PrepareCoordinationQFSQuery.cpp(221):
    CCLAssertError: CCL_RETHROW: QEQFSQuery.cpp(148): CCLAssertError:
    CCL_RETHROW: QFSQuery::PrepareQFSQuery.cpp(148): CCLAssertError:
    CCL_RETHROW: QFSQuery::PrepareCoordinationQFSQuery.cpp(221):
    CCLAssertError: CCL_RETHROW: QEQFSQuery.cpp(148): CCLAssertError:
    CCL_RETHROW: QFSQuery::PrepareSource/QE_RsApi.cpp(3604):
    CCLAssertError: CCL_RETHROW: QESource/QE_RsApi.cpp(3488):
    CCLAssertError: CCL_RETHROW: QESource/QPQTPromptResolver.cpp(2051):
    CCLAssertError: CCL_THROW:</p>
  </blockquote>
  
  <p>So, here is what I'm doing in my report. I have 9 charts in my report. 6 of which have two date prompts(from and to date ranges) and the other 3 have just one date prompt. These would orignially default to Jan 01, 1999. This was because when the report is ran, there are two date prompts on the prompt page. The user would select the date range and it would be applied to all the charts at the start. Then the user could use the date prompts for each chart to change the data being shown for individual charts. But now I need to pass the dates selected in the prompt page to the date prompts in the report page, instead of the report page prompts defualting to Jan 01, 1999. To do this, I created hidden date prompts in the prompt page that sahre the same parameter as the prompts in the report page. Then I made a html button that would pass the dates selected in the visible date prompts to the hiddin prompts. Thus passing those values to the report page. Now this works fine for the 6 charts that have two date prompts. But this error happens for the other three. I've tested each chart separately. The focus of my testing has been on one chart called Section J. This chart consist of 4 queries that are then unioned together. Which is what is being done for the charts that work. But in my testing I've found that when I replace the union query with one of the regular queries as the chart query, it runs fine. I'm just not getting all the data I need. So it only seems to break when I use the unioned query. Which is weird because even the charts taht work are using unioned queries. The big difference between teh ones that work and the ones that don't is how the dates are beign used. In the charts that don't work, there is one date prompt and the date range is made by using _add_months() to go back three years. The charts taht work don't do this. So I thought that was the issue, but my testing hasn't proved that as of yet. I've search online for a solution, but I can't seem to find any info that is helpful.</p>
  
  <p>One last thing, this is the error I get when I try to validate the report:</p>
  
  <blockquote>
    <p>RSV-VAL-0010 Failed to load the report specification.
    CCL_ASSERT(gw!=NULL);</p>
  </blockquote>
  
  <p>Edit:
  Also, it may be good to point out that I'm using a crosstab with a line graph attached. But two of the six working charts are done the same way. Just wanted to put that in there to.</p>