INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Two Static Date Parameters where only one can be selected

Two Static Date Parameters where only one can be selected

(OP)
Hello,

I'm working in Crystal XI and have been asked to write a report which contains two separate dates. A Date of Service (DOS) and an Entry Date. The end user wants the report to be run by either the DOS or the Entry date but not both. For example run the report for a DOS of 5/1/15 regardless of the Entry date or run the report for an Entry date of 5/1/15 regardless of the DOS. The end results would look some thing like this:

DOS 5/1/15:

Date Of Svc Date Of Entry
5/1/2015 5/5/2015
5/1/2015 5/5/2015
5/1/2015 5/5/2015
5/1/2015 5/5/2015
5/1/2015 5/5/2015
5/1/2015 5/5/2015
5/1/2015 5/5/2015
5/1/2015 5/13/2015
5/1/2015 5/5/2015
5/1/2015 5/5/2015

or

Entry Date 5/1/15:

Date Of Svc Date Of Entry
4/29/2015 5/1/2015
5/1/2015 5/1/2015
4/27/2015 5/1/2015
4/29/2015 5/1/2015
4/29/2015 5/1/2015

I've set up two static parameters for the selection process and attempted to drive the selection by writing the record selection formula as follows: ({PatientVisit.Entered} = {?EntryDate} or {PatientVisitProcs.DateOfServiceFrom} = {?DateofService}) however this does not work. I also tried using a default value in the parameter however this did not work either as my parameter is set up to allow ranges. The intent is to prevent the end user from utilizing both parameters in the same report. In essence if DOS is entered than the Entry Date is to be ALL and if the Entry date is entered than the DOS is to be ALL. I've also tried creating a Command Table to capture the dates, however every time I add a Command Table my reports fail.

Your assistance is appreciated.

RE: Two Static Date Parameters where only one can be selected

There is no way to prevent the user from entering both dates. However, you could do something like this:

1. Add a parameter where the user selects the specific date to use - DOS or Entry.
2. Use a single date parameter.
3. In the Select Expert, you'll do something like this (the parentheses are important!):

(
({?Date Type} = 'DOS' and {MyTable.DOS} in {?Date Range}) or
({?Date Type} = 'Entry' and {MyTable.EntryDate} in {?Date Range})
)

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
www.decisionfirst.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close