If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Create custom field in report

Started by nfldbunker, 02 Nov 2009 06:11:38 AM

Previous topic - Next topic

nfldbunker

hi

I have a request to create a report and show age based on a age category which does not exist currently in our reporting environment. The age is available and i want to know if i can create a custom field called age category.

The category would be
0-7
7-13
13-19
19-35
etc.

Is there a way to create this in my report based on age.

Please let me if any how i can achieve this functionality.

regards

bunker

Gollapudi

Add a Data Item into your Query and give the following statement for that...

Case
When ([Age]>=0 and [Age]<=7) then('0-7')
When ([Age]>=7 and [Age]<=13) then('7-13')
When ([Age]>=13 and [Age]<=19) then('13-19')
When ([Age]>=19 and [Age]<=35) then('19-35')
When ([Age]>=35 and [Age]<=50) then('35-50')
else('Above 50')
End

Thanks,
Gollapudi.

nfldbunker

hi

thanks i am receiving the following error.

UDA-SQL-0460 A general exception has occurred during local processing. UDA-EE-0094 The operation "greater_equal" is invalid for the following combination of data types: "varchar" and "integer" RSV-SRV-0042 Trace back: RSReportService.cpp(747): QFException: CCL_CAUGHT: RSReportService::process() RSReportServiceMethod.cpp(217): QFException: CCL_RETHROW: RSReportServiceMethod::process(): promptPagingForward_Request RSASyncExecutionThread.cpp(690): QFException: RSASyncExecutionThread::checkException RSASyncExecutionThread.cpp(204): QFException: CCL_CAUGHT: RSASyncExecutionThread::run(): promptPagingForward_Request RSASyncExecutionThread.cpp(740): QFException: CCL_RETHROW: RSASyncExecutionThread::processCommand(): promptPagingForward_Request Execution/RSRenderExecution.cpp(570): QFException: CCL_RETHROW: RSRenderExecution::execute Assembly/RSDocAssemblyDispatch.cpp(251): QFException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssembly Assembly/RSLayoutAssembly.cpp(63): QFException: CCL_RETHROW: RSLayoutAssembly::assemble Assembly/RSDocAssemblyDispatch.cpp(317): QFException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchChildrenAssemblyForward Assembly/RSReportPagesAssembly.cpp(163): QFException: CCL_RETHROW: RSReportPagesAssembly::assemble Assembly/RSDocAssemblyDispatch.cpp(268): QFException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssembly Assembly/RSPageAssembly.cpp(284): QFException: CCL_RETHROW: RSPageAssembly::assemble Assembly/RSDocAssemblyDispatch.cpp(268): QFException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssembly Assembly/RSTableRowAssembly.cpp(154): QFException: CCL_RETHROW: RSTableRowAssembly::assemble Assembly/RSDocAssemblyDispatch.cpp(268): QFException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchAssembly Assembly/RSTableCellAssembly.cpp(108): QFException: CCL_RETHROW: RSTableCellAssembly::assemble Assembly/RSDocAssemblyDispatch.cpp(317): QFException: CCL_RETHROW: RSDocAssemblyDispatch::dispatchChildrenAssemblyForward Assembly/RSAssembly.cpp(610): QFException: CCL_RETHROW: RSAssembly::createListIterator Assembly/RSAssembly.cpp(651): QFException: CCL_RETHROW: RSAssembly::createListIterator RSQueryMgr.cpp(952): QFException: CCL_RETHROW: RSQueryMgr::getListIterator RSQueryMgr.cpp(1019): QFException: CCL_RETHROW: RSQueryMgr::getResultSetIterator RSQueryMgr.cpp(1165): QFException: CCL_RETHROW: RSQueryMgr::createIterator RSQueryMgr.cpp(1475): QFException: CCL_RETHROW: RSQueryMgr::executeRsapiCommand RSQueryMgr.cpp(1462): QFException: CCL_RETHROW: RSQueryMgr::executeRsapiCommand RSQueryMgrExecutionHandlerImpl.cpp(172): QFException: CCL_RETHROW: RSQueryMgrExecutionHandlerImpl::execute() RSQueryMgrExecutionHandlerImpl.cpp(164): QFException: CCL_RETHROW: RSQueryMgrExecutionHandlerImpl::execute() RSQFSession.cpp(241): QFException: CCL_RETHROW: RSQFSession::DoRequest QFSSession.cpp(604): QFException: CCL_RETHROW: QFSSession::ProcessDoRequest() QFSSession.cpp(602): QFException: CCL_CAUGHT: QFSSession::ProcessDoRequest() QFSSession.cpp(551): QFException: CCL_RETHROW: QFSSession::ProcessDoRequest() QFSConnection.cpp(737): QFException: CCL_RETHROW: QFSConnection::Execute QFSQuery.cpp(117): QFException: CCL_RETHROW: QFSQuery::Execute v2 CoordinationQFSQuery.cpp(3775): QFException: CCL_THROW: CoordinationPlanner


Gollapudi

is your [Age] item data type si Varchar??

If so, you need to convert the same to Numeric.

nfldbunker

HI

Patient Age is showing int32 in the raw database tables and in the primary database view it is also int 32 but it is in the business view it is showing as a character length 16.

i did not create this model but where and how do i chaneg this to reflect as an interger.

regards

bunker