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

Author Topic: Automating a report in cognos 8.4  (Read 9638 times)

Aditi

  • Guest
Automating a report in cognos 8.4
« on: 30 May 2012 04:57:05 am »
Hi All,
I need to automate a report in cognos for the previous month.
I am currently working in 8.4 version and proceeding by making changes with the filter but its not helping me .
Below is the code im using for Filter condition:

[DataItem] between (first_of_month(add_months(current_date,-1)) and (last_of_month(add_months(current_date,-1)))
Its giving me Pogo Handling errors while i validate the report.
Any suggestion on how can i automate my report?

Thanks,
Aditi

Aditi

  • Guest
Re: Automating a report in cognos 8.4
« Reply #1 on: 30 May 2012 05:50:10 am »
Also the format in which my dataitem is : yyyymm

Offline Lynn

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 2,702
  • Forum Citizenship: +342/-1
Re: Automating a report in cognos 8.4
« Reply #2 on: 30 May 2012 06:57:48 am »
The two portions of your between clause will return DATE datatypes. The datatype of [DataItem] must also be a date.

Aditi

  • Guest
Re: Automating a report in cognos 8.4
« Reply #3 on: 31 May 2012 06:46:44 am »
Hi Lynn,
I understand the format of the two is not matching here, could you please tell me the exact equation or the function to be used to make the format same.
I tried using caption function and then casting it into varchar...
but i tink i am not framing it properly.

Please help.

Thanks,
Aditi

Offline Lynn

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 2,702
  • Forum Citizenship: +342/-1
Re: Automating a report in cognos 8.4
« Reply #4 on: 31 May 2012 07:24:26 am »
I'm not sure you posted this question to the correct board which is unfortunate since you may not get the benefit of advice from others. Is your source a cube? You mention the caption function which is a dimensional concept although filtering is a relational construct.

There are numerous posts about not mixing dimensional and relational constructs. I suggest you search the boards more thoroughly to see if you can find an answer already posted. I'm afraid I don't know how to advise you on how to achieve your requirement.

Aditi

  • Guest
Re: Automating a report in cognos 8.4
« Reply #5 on: 01 Jun 2012 04:14:13 am »
Lynn,
I am now trying to do it by using the following code description:

case (?P_timebucket?)
when (1)
then
(
[MONTHYEAR] = extract(year,getdate())+
extract(month,getdate()-1)
)
else (1=2)
end

Monthyear is of the format 201206 and the left side of the equation sign is to be converted to the same format as the right side.

My source is a cube as enquired by you in the previous post.

Thanks,
Aditi

Offline Lynn

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 2,702
  • Forum Citizenship: +342/-1
Re: Automating a report in cognos 8.4
« Reply #6 on: 01 Jun 2012 09:19:49 am »
I'm not well versed enough on reporting with cube sources to answer you question. I do know that case is also a relational concept rather than a dimensional concept, so I suspect you are barking up the wrong tree.