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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defaulting Today's Date at a Prompt

Status
Not open for further replies.
Dec 18, 2006
69
0
0
US
Hello,

I am on Crystal Professional XI. I currently set up 2 parameter prompts for invoice date. They are Start Invoice Date and End Invoice Date. Is there a way for me to default the End Invoice Date to be today's date? I have set them up to be 01/01/1990 for start and 12/31/2099 for end at this time. But more than likely my users are going to only look at today's date.

I know I can do this if I embed the parameter manually into the report. But I need to have the report to be flexible enough to have the date changed if needed.

Thanks in advance.

TTL101
 
I apologize, I am not sure I understand what you meant by the default is the current date. Can you please elaborate? At prompt time, those start and end invoice date prompts show blank by default unless you set defaults when you create the parameter prompts.
At this time, these are the prompts I am looking at when I run my report:

Enter Start Invoice Date 01/01/1990 (I have it default when I created the prompt)
Enter End Invoice Date 12/31/2099 (I also have it default when I created the prompt)

So what I am trying to get is to have at that prompt when I run my report to actually say 01/30/2009 rather than 12/31/2099. When I run this tomorrow, I would like to see 02/01/2009 at that prompt and so on and so forth.

Hope I explain it better this time. Thanks in advance once again.
 
In CR XI, the default is not dynamic and cannot change in the prompt screen depending upon the current date. So what you could do, is use prompt text like:

"To use the currentdate as the enddate, choose the default 12/31/2099, otherwise select an enddate:"

Then use a record selection formula like:

(
(
{?Enddate} <> date(12,31,2099) and
{table.date} <= {?Enddate}
) or
(
{?Enddate} = date(12,31,2099) and
{table.date} <= currentdate
)
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top