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

Date prompts

Started by iulian.bobalca, 07 Sep 2007 01:06:16 AM

Previous topic - Next topic

iulian.bobalca

Hello!



I have some troubles with date prompts: on a prompt page I add two date prompts (from_date and to_date), which I would like to be optional. My questions:



1. When I run the report, even if I set the 'Required' property to NO, they still get today date. Is there a way to blank the edit box (if 'Select UI' is EditBox) or to uncheck the box (if 'Select UI' is Calendar) ? Or maybe a way to set 'Default Selection' to null :) or ' ' or '  -   -  -' ?



2. Let's say we can't fix problem number 1; is there a way to get the minimum value from the database - min(my_date_column) - for the from_date prompt ?



3. If I set the from_date and to_date to today's date, I get no result, even if the parameters are <= and >=  (my_date_column >= from_date and my_date_column <= to_date). Why is that ?



Thank you in advance!

Suraj

1. Don't understand properly, but users will get a date when they run even without selecting any optional prompt. Check your query filter for what date is filtered on by default. If its blank, it'll be default from database.
2. Yes you can use minimum(date)
3. If you don't get results for any date that you select, check the format of data items filtered. If date selected is in different that date filtered, it'll always be blank.

iulian.bobalca

Unfortunately you got all my questions wrong :

1. I would like the two date prompts to stay blank if the user doesn't change their value (as the parameters are optional). When I run the report, the prompt get a value by default: today's date.

2. How can I set the value of the prompt to min(date) ?

3. I get no results because if I select today's date, by default the time is added: 12.00 am. I think I should only work with dates and not hours too when I set the filter.

iulian.bobalca

A workaround for problem number 3 ( if I selected X as a start date and X as an end date, I got no results, even if records existed in the database) if to add a day to end date : [Business View].[UpToDate Report].[Date] <= _add_days(?parEndDate? , 1)  (now I get everything from midnight X to midnight X+1, which is actually what I wanted in the first place)

Suraj

The following two Cognos KB documents may be of some help, for details, go to cognos support:
********************************
Title: How to make an optional date prompt default to Disabled in Report Studio
Document#: 1027921.2
Applies To: Cognos 8 BI Report Studio 8.1 | Cognos ReportNet 1.1MR3
Multimedia:
There is a video on this topic in the Multimedia Knowledge Base.
SupportLink:
There is an article on this topic in the SupportLink Archives.
***************************************
Title: Setting Default and Relative Prompt Values for Date Type Prompts in Cognos ReportNet
Document#: 1027924.1
Applies To: Cognos 8 BI Report Studio 8.1 | Cognos 8 BI Report Studio 8.2 | Cognos ReportNet 1.1MR3
Multimedia: There is a video on this topic in the Multimedia Knowledge Base.
SupportLink: There is an article on this topic in the SupportLink Archives.

iulian.bobalca

Thank you for the info. Very helpful!  ;)