hi Guys,
This is my first post, and also I am new to Cognos... please guys help me out...
I got a question in cognos report studio
If am not using any tables and if i create a value prompt with two static choices [say current year and previousyear] and if user selects current year in
prompt page application should display like Select Year is : 2009
[Text Item] Select year : <layoutcalculation>
but the question is how do i put the calculated expression in the layoutcalculation on the report....
[like for current year/date : today() and for previousyear/date : _addyears(date2timestmp(today()),-1)] but where and how do i assign these variables in the layout calculation on the report...
thanks
meher28
I am not getting what is ur question but what i have understood based on post is it should diplay if the user selects current year i.e.,2010 then he should get
Select Year is : 2009
try this
(text item)Select Year is : <case when paramvalue(?date?)= 'sysdate' then
_add_years(sysdate,-1) else ?date? end>
Thank alot for Your Reply!
but where do i place the expression in the , i mean do i have to place the expression in the report expression property/field for the text item ????
Regards,
meher28
u need to tell where u want to place i thought it should display in the header of the report page if u select in the prompt page........
SORRY ABOUT IT [i admit i was not clear]
In the prompt page I have a value prompt [with static choices] --- Current Year and Previous Year
If the user selects current year
application/report should display value on the report [any where like page body/header like
Selected Year : 2009
[Text Item] : <Layout Calculator>
So where do i place the expression i mean in layoutcalculator expression or where?]
i have clearly mentioned layout calculation symbol <>
like this i shown text item :< >(layout calculation..............)
:)
first of all thank mvjcognos for your reply...
I certainly get it a try .... hope this works thanks a lot
Hi MVJCognos,
After placing the query in the layout calculator express i am getting this error [not working ]
eRror message:
A parsing error was found at or near the position 75 in the expression "case when paramvalue('Parameter1')= 'Previous Year' then _add_years(sysdate,-1) else Today () end ".
Detailed Error message:
RSV-SRV-0042 Trace back:RSReportService.cpp(792): crxException: CCL_CAUGHT: RSReportService::process()RSReportServiceMethod.cpp(239): crxException: CCL_RETHROW: RSReportServiceMethod::process(): promptPagingForward_RequestRSASyncExecutionThread.cpp(774): crxException: RSASyncExecutionThread::checkExceptionRSASyncExecutionThread.cpp(211): crxException: CCL_CAUGHT: RSASyncExecutionThread::run(): promptPagingForward_RequestRSASyncExecutionThread.cpp(824): crxException: CCL_RETHROW: RSASyncExecutionThread::processCommand(): promptPagingForward_RequestExecution/RSRenderExecution.cpp(593): crxException: CCL_RETHROW: RSRenderExecution::executeAssembly/RSDocAssemblyDispatch.cpp(264): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSLayoutAssembly.cpp(64): crxException: CCL_RETHROW: RSLayoutAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(331): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchChildrenAssemblyForwardAssembly/RSReportPagesAssembly.cpp(163): crxException: CCL_RETHROW: RSReportPagesAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(281): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSPageAssembly.cpp(287): crxException: CCL_RETHROW: RSPageAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(281): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSTableRowAssembly.cpp(160): crxException: CCL_RETHROW: RSTableRowAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(281): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssemblyAssembly/RSTableCellAssembly.cpp(122): crxException: CCL_RETHROW: RSTableCellAssembly::assembleAssembly/RSDocAssemblyDispatch.cpp(331): crxException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchChildrenAssemblyForwardRSExpression.cpp(209): crxException: CCL_THROW: RSExpression::parse
please help me out banging my head