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

Changing default time in Date/Time v9.0

Status
Not open for further replies.

CESHRPR

Programmer
Aug 1, 2002
23
US
The default on the date time fields in my reports is to current date, and current time. User wants begin time to default to 00:00:01, and end time to 12:59:59. Can't quite figure out how to do this for date/time parameters. Maybe through the ranges? I don't know - help?
 
Perhaps what you're trying to ask is how to change the default values for parameters in Crystal?

Fields values are stored in the tables and aren't changed by Crystal.

As for parameters, select the Set Default Values and hardcode in the values that you want as the default for each.

If you're using date ranges you can only set the default value for both with the same format.

-k
 
Thanks - that's exactly what I was trying to ask. Thought I'd tried thatthis morning but apparently did something different. I'm really not blonde, I promise. Thanks for your help.
 
You shouldn't set a default value for the parameter because if you do this you won't get the current date (which I assume is a portion you want to keep).

The solution is to change the parameter to a data type of DATE (not DateTime). Then, in your record selection condition, take care of the logic.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
The above solution assumes the users don't really need to specify a time portion. If they do, you have 2 choices:

1. split the 2 parameters into 4 (the time portion being text.

2. Use a logic that says that End-Time is a point just outside the range. Make sure the prompt for the end time says something like: "Date and Time up to but not including..." This way, your users can simply specify the date 1 day after the "closing" day.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top