COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cbyrne on 06 Jul 2011 08:56:59 AM

Title: Win-Loss Chart in List Report
Post by: cbyrne on 06 Jul 2011 08:56:59 AM
Hello i have a list report in report studio and a data item which counts the days between dates, this works fine but i want these days to show in my win-loss chart.  I have a default which is 2 days so if the days go over it will show above and if the days are below 2 then show as a loss.  :(

Dafault data item1 = (current_date -2)


Data item2 =  _days_between([CIR End Date],[Activity Received Date])


Data item 1 is my default

and

Data iem 2 is my win-loss measure

Below is the error i am receiving:

QE-DEF-0261 RQP - Parsing text: (_days_between(to_date(REPCUSTOMATTRIB([Work].[R5EVENTS].[EVT_CODE],'*','RMP254','EVNT','R5'),'MM-DD-YYYY HH24:MI:SS'),to_date(REPCUSTOMATTRIB([Work].[R5EVENTS].[EVT_CODE],'*','RMP352','EVNT','R5'),'MM-DD-YYYY HH24:MI:SS')) > 2 auto) RQP-DEF-0149 The query specification is incorrect. RQP-DEF-0457 Referenced Query 'Query1' is not defined or its query items contain unresolved references. RSV-SRV-0042 Trace back: RSReportService.cpp(758): QFException: CCL_CAUGHT: RSReportService


Many Thanks

Chris
Title: Re: Win-Loss Chart in List Report
Post by: MFGF on 06 Jul 2011 11:28:09 AM
Are [CIR End Date] and [Activity Received Date] calculated items? It looks like they are using a database function to convert non-date items to a dates?  Is this correct?

MF.
Title: Re: Win-Loss Chart in List Report
Post by: cbyrne on 06 Jul 2011 11:59:17 AM
Hi MF, i think so, i have two custom date fields in EAM database, see below and in report studio i have a data item which totals the days between those dates in a list.


[CIR End Date]   = to_date(REPCUSTOMATTRIB([EVT_CODE], '*','RMP254', 'EVNT', 'R5'),'MM-DD-YYYY HH24:MI:SS')


[Activity Received Date]  = to_date(REPCUSTOMATTRIB([EVT_CODE], '*','RMP352', 'EVNT', 'R5'),'MM-DD-YYYY HH24:MI:SS')


both properties are set to Aggregate Function = Not Aplicable and Rollup Agregate Function = None.


Thanks

Chris
Title: Re: Win-Loss Chart in List Report
Post by: cbyrne on 06 Jul 2011 12:48:19 PM
Hi MF, Just changed the properties of data item [Rec to CIR Days] both to summarise and the report ran but only showed one bar where i was expecting several especially when i have a list of several different days.


Thanks

Chris
Title: Re: Win-Loss Chart in List Report
Post by: Lynn on 06 Jul 2011 01:24:06 PM
Your default data item will be a date (current date minus 2). Your measure is an integer (number of days between two dates).

Could it be you are mixing up default with threshold? I would think you'd have threshold of two and specify your calculated item as the win-loss measure. Then set whatever the other element is for the categories. The number of categories would determine how many bars you see.

You mentioned "several different days" in your last post, but I can't quite tell what that is from the context of your other posts.