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

Default date prompt value for scheduler - today

Started by stancho, 16 Mar 2011 12:16:31 PM

Previous topic - Next topic

stancho

Hi all,

I have a report created in Report Studio.
The report requires a Date parameter. The list report in it is filtered by this parameter.
I have a scheduler and the report is executed every day.

How can I change the default value for the scheduler and
so the default value of the date to be TODAY.

I tried to set the filter optional, tried to create a data item but no success :(

Thanks,
Stanislav

Mpotla

Hi ,

This we can resolve  by combining the ParamMaps with Prompts.

1. in the Date prompts restict the maximum showing in the calneder to the current date  and use ranking on the date in descending order. then Create one data item with expression
case
when rank(item)=1 then
('Current') else
date
end
set the defaulte value to the prompt with data item calculated.

2. in FM create the paramMap with Value as Dates, Key with the above expression same as the data item created in report.

3.Now While scheduling the report set the prompt value with 'Current' which always gets the current date from the parameter map.

Hope this will help.

Regards
Mohan

stancho

Hi mohanpotla,

thanks a lot for your quick answer.

I have several questions because I couldn't manage to execute the steps above.

1. "in the Date prompts restict the maximum showing in the calneder to the current date" -
How can I do that? I am only able to change the "Last date" property of the Date Prompt to a static date (not to 'today').

2. "use ranking on the date in descending order" - Is this a property of the date prompt?

3. "Create one data item with expression " - Where should I create this Data Item? In the query of the list?

4. "rank(item)". Is this 'item'. What does this item refer to?

5. "else date". Is this "else current_date" ?

6. "set the defaulte value to the prompt with data item calculated." . It is only able to change the default value of  the data prompt with a static date?

7. What is name of the paramMap created in FM . Is it 'Current'>

8. "in FM create the paramMap with Value as Dates". When creating paramMap I can set key-value and default Value. What does it mean "with Value as Dates".

9. The same question for FM like 4. and 5.

10. "Now While scheduling the report set the prompt value with 'Current'".
I'm only able to select a Date when setting the default values for scheduling reports.
Should I just have to type 'Current' in the box of the prompt.

Sorry for these many questions!
Thanks in advance,
Stancho

BobRed0965

Stancho,

I typically deal with this using two prompts in combination.  One Value prompt and one date prompt.

In the value prompt I put static values for relative date ranges (Today, Yesterday, This week, Last Week, This Month, Last Month, etc.).  In addition to the relative date ranges, I also include a static value in the value prompt labeled something like "Specific Date Range".

The second prompt is a standard date range prompt.  This prompt is ignored unless "Specific Date Range" is selected in the value prompt.

The query filter looks something like this:
(?SelectedRange? = 'Today' AND [data item].[date] = {Sysdate})
OR
[...Several other possible ranges...]
OR
(?SelectedRange? = 'Specific Date Range' AND [data item].[date] in_range(?DateRangePrompt?))

I hope this helps.

PRIT AMRIT


stancho

Thanks a lot guys.

Bob I managed to do it this way. I also set the value prompt visible = false.
It's working fine!

barrysaab

Thanks,BobRed09.Is it possible to please attach example XMl here.Thanks
Boy! Cognos getting on to me!!!

Steve

Quote from: BobRed0965 on 17 Mar 2011 02:33:23 PM
Stancho,

I typically deal with this using two prompts in combination.  One Value prompt and one date prompt.

In the value prompt I put static values for relative date ranges (Today, Yesterday, This week, Last Week, This Month, Last Month, etc.).  In addition to the relative date ranges, I also include a static value in the value prompt labeled something like "Specific Date Range".

The second prompt is a standard date range prompt.  This prompt is ignored unless "Specific Date Range" is selected in the value prompt.

The query filter looks something like this:
(?SelectedRange? = 'Today' AND [data item].[date] = {Sysdate})
OR
[...Several other possible ranges...]
OR
(?SelectedRange? = 'Specific Date Range' AND [data item].[date] in_range(?DateRangePrompt?))

I hope this helps.

Really smart way Bob !

suly

Hi All,

I know that this post is very old, but a really want to use this technique with static choices without scheduling.
Can somebody explain to me in details the step for creating in_range date prompt with default choice: 7 days ago to current date?
I have date prompt [SALES(Query)].[StartDate].[DATE] in_range ?Datep? and value prompt without data item.


And know?

10x a lot!