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

How to filter data from "from year,month" to "to year, month"?

Started by suhas_bhat, 23 Jan 2011 10:23:08 PM

Previous topic - Next topic

suhas_bhat

Hi all,
  I am using a relational package with Oracle database.
I have 4 value prompts viz. "from year","from month","to year" and "to month" and i need to filter data for say Eg:Oct,2009 to Jan 2011"

I tried doing it this way, concatenating ?f_month?||'01'||?f_year? and then typecasting to DATE so that i could filter using my [calendar date] field.
Unfortunately this is not working, am getting errors like 'sqlPrepareWithOptions' status='-126'. and 'sqlScrollBulkFetch' status = '-232'. These errors are coming only for this particular report even when i test usin hardcoded values like Eg: to_date('01-10-2010','DD-MM-YYYY)  >:(

Is there any alternate way to code this?? My use value for year and month are [year] and [month number]

Please help..

PRIT AMRIT

Can we try it in other way around?

It's weird but just for testing....

Extract the Year, Month, Day from your [Calenderdate] item.
Create another data 'CalDate' item like, to_number(to_char([YEAR])+to_char([Month])+to_char([Day]))

Filter CalDate=?f_year?+?f_month?+'01'

suhas_bhat