COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: DaniEU on 05 Aug 2016 01:43:11 AM

Title: Error when calculating dates
Post by: DaniEU on 05 Aug 2016 01:43:11 AM
Hello all,

I was requested to create a simple report from a relational data (SalesForce.com).
I have to filter in some cases a total of occurences in the last week, and in other cases in the current month.
I have also to get data from three different tables. In Framework Manager I have created a relationship between the tables using a common ID value.
I'm getting an error when I use "currentdate" in a filter.
That's the error
XQE-DAT-0001

      Data source adapter error: Executing "SELECT CreatedDate, CurrentDate(), Related_Lead__c, Department__c FROM Lead_Opp__c WHERE (NOT(Department__c = NULL))" failed. Error message "java.lang.RuntimeException: [{"message":"\nSELECT CreatedDate, CurrentDate(), Related_Lead__c, Department__c\n ^\nERROR at Row:1:Column:32\nunexpected token: ')'","errorCode":"MALFORMED_QUERY"}]" . - when processing query: SELECT CreatedDate, CurrentDate(), Related_Lead__c, Department__c FROM Lead_Opp__c WHERE (NOT(Department__c = NULL)).

Can someone help me to understand this error?
Title: Re: Error when calculating dates
Post by: BigChris on 05 Aug 2016 02:03:57 AM
Is CurrentDate a SalesForce function - I think the cognos function is current_date
Title: Re: Error when calculating dates
Post by: DaniEU on 05 Aug 2016 02:34:53 AM
Sorry, I was using cognos current_date.
Title: Re: Error when calculating dates
Post by: AnalyticsWithJay on 05 Aug 2016 09:14:15 AM
Check your FM expressions for CurrentDate(), as it is not a valid function.