Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass current date to paramter in CMC

Status
Not open for further replies.

ridhirao22

Programmer
Aug 27, 2010
140
US
Hello to All,

Using CR 2008, Enterprise XI-R3, Oracle 11g.

I have a report with date parameter and I am trying to automate the report in CMC and need to pass the date parameter to current date as default. Could anyone please help me how to do this?

TIA,
RR

 
Simple answer, you can't. However, there is a way around this.

Create a new parameter that has a Yes/No answer so the user can specify whether to use the current date or a specified date. Your selection criteria then becomes something like this:

(({?UseCurrentDate} = 'Yes' and {table.date} = CurrentDate) or
({table.date} = {?DateParam}))

Note the use of parentheses - if you have other selection criteria in your report, these become important!

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Thanks, Dell. Tried this but doesn't work for me as the parameter is called by SP.
 
You have a couple of options:

1. Set up the SP so that if the date parameter is null, it defaults to the current date. I think Crystal will work with this, but I'm not certain.

2. Create a new version of the report/SP combination that doesn't require a date parameter and use that for your scheduled runs.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top