COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Kiran Kandavalli on 17 May 2017 04:37:26 PM

Title: _add_days Function is not showing in Where Clause
Post by: Kiran Kandavalli on 17 May 2017 04:37:26 PM
Team,

we are using Denodo Database.

1) I have a Date Prompt
2) The Date prompt parameter need to be applied in filter

    End_Date=?p_EndDate?

3) We have transactions until 11:59:59 PM

4) As in Cognos Date Prompt - by default the Time Stamp is  12:00:00 AM

5) Some of the Records got Drop, so I have used the filter as below scenarios.

   Adding 1 Day Extra to the Paramter -  [Presentation Layer].[ABC].[End Date] = _add_days(?p_EndDate?,1)

      using Prompt Functionality -  [Presentation Layer].[ABC].[End Date] =  to_date(#prompt('p_EndDate','date')#||' 11:59:59 PM','YYYY-MM-DD HH:MI:SS PM')

6) When I generate the SQL the End Date filter is not shown in where Clause.

Can anyone know the reason why it is not showing.

Thanks!
Kiran

   

   
Title: Re: _add_days Function is not showing in Where Clause
Post by: Niranjan81 on 26 May 2017 01:18:51 PM
Did you check IBM Cognos SQL or Native SQL.
It should appear in IBM Cognos SQL.
Title: Re: _add_days Function is not showing in Where Clause
Post by: Kiran Kandavalli on 26 May 2017 03:02:07 PM
Yes I have checked Native & Cognos SQL - it is not showing.

Perhaps it is the problem with Denodo Database.

Title: Re: _add_days Function is not showing in Where Clause
Post by: bdbits on 31 May 2017 11:02:24 AM
Just a thought - does the filter appear to be filtering results even when it is not in the where clause? If so, it may be using local processing (within Cognos). That is generally not a good thing, but might explain it.

I am not really familiar with Denodo, but found the following after googling a little bit. It does appear related to filtering issues like you are having.
https://community.denodo.com/answers/question/details?questionId=90670000000Ccm1AAC&title=How+Cognos+report+filters+work (https://community.denodo.com/answers/question/details?questionId=90670000000Ccm1AAC&title=How+Cognos+report+filters+work)