Crystal Reports 10.0.0.533: Date without Time, Blank for 01/01/1900

Hello:

Attached is my Crystal report for version 10.0.0.533, and attached is the SQL view that represents the programming for the report called "CARBON".

The report forces the end user, for parameters, to choose DateTime values based on 12:00:00AM.  This is true, when creating the Default Values and when the end user is prompted to choose dates in the "Dates" parameter and in the "Close Date" parameter.

Is it possible in the programming of the view, or in Select Expert of the report preferably, to enter some formula that does not force the end user to worry about the time element?

Also, for NULL dates, the end user has to choose 01/01/1900.  Is there a way to allow the user to choose say "blanks" instead of "01/01/1900".

Thanks!

TBSupport
CARBON-COMMISSION.rpt
CARBON.docx
LVL 1
TBSupportAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
Just make the parameter a date type rather than a datetime.

mlmcc
0
James0628Commented:
As mlmcc said, you could change the datetime parameters to date.  But then the times in the datetime fields will be an issue (assuming that they're not always midnight).  You could use the Date function on DocumentDate and CloseDate in the record selection formula, to remove the times from those fields, but that may slow the report down.  Your current tests may or may not be passed to the server.  I haven't used views much, so I'm not sure.  If the current tests _are_ being passed to the server, they probably won't be if you add Date functions, so the report will take longer (how much longer will depend on how much data you have).  But if the current tests are _not_ being passed to the server, then adding the Date functions won't change anything.

 If you aren't sure, you could go to Database > "Show SQL Query" and see what it says.  I can't do that here, because CR wants to connect to the db.

 James
0
TBSupportAuthor Commented:
Hello:

I cannot change the parameters from DateTime to Date, as doing so will throw out the table and field selection.  I have tried that.

Below is my select expert formula.  Could you please show me what you mean, by using the Date function?:

{CARBON.DocumentDate} = {?Dates} and
{CARBON.Project} = {?Job} and
{CARBON.Editor} = {?Editor} and
{CARBON.Status} = {?Status} or
{CARBON.CloseDate} = {?Close Date} OR ToText({CARBON.CloseDate}, "dd-MMM-yyyy") = '1/1/1900'

Thanks!

TBSupport
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

mlmccCommented:
What do you mean changing to a DATE will throw out the table and field selection?

You can set the default value for the dates to be 1/1/1900

Try the attached version of the report for the same timeframe

WHat we meant by DATE function is

Date({CARBON.DocumentDate}) = {?Dates}

mlmcc
CARBON-COMMISSIONrev1.rpt
0
TBSupportAuthor Commented:
Thanks, for the quick response, mlmcc!  I don't want 01/01/1900.  I want that date to be a blank.  

So, essentially, for the Edit Parameter values window, you used "Date" instead of "DateTime".  That strips out the field from the view.  But, it looks like you compensated for this by creating formulas that begin with "e".  Is that right?

TBSupport
0
TBSupportAuthor Commented:
Whoops!  I meant to say that that "strips out the field from the parameter"--not the view.

Sorry for the confusion.

TBSupport
0
TBSupportAuthor Commented:
And, it looks like the formulas begin with "z"--not "e".

TBSupport
0
mlmccCommented:
No.  The z formulas are to display the values entered for the parameters.

What do you mean it strips it out from the parameters?
Are you viewing the SQL the report produces?
If the date tests are no longer in it that just means the test/filter in done on the client not the database

mlmcc
0
mlmccCommented:
Did the report produce the correct results?

mlmcc
0
TBSupportAuthor Commented:
What do you mean it strips it out from the parameters?
If you go to the Edit Parameter Values window and click "Default Values", the field from the database is no longer there.

TBSupport
0
mlmccCommented:
That will only affect the selection of the values.  It shouldn't affect the running of the report.

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.