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

Crystal Reports 2013 sp 5, Oracle 11g - Crystal Command Parameter Range Dates from Field1 or Field2

Status
Not open for further replies.

hmax

Programmer
Jan 22, 2012
60
US
Crystal Reports 2013 sp 5
Oracle 11g

Crystal Command Parameter Range Dates from Field1 or Field2

For example,

Start Date >= Table.Field1 or Start Date >= Table.Field2
and
End Date <= Table.Field1 or end Date <= Table.Field2

Can this be handled programmatically to avoid creating 4 separate paramaters for the Date Range?

Thank you.
 
Create a Date Parameter, then in the properties area at the bottom set Allow Range Values to True.

Now you can just say: {table.field1} in {?DateRange} or {table.field2} in {?DateRange}


Printing a date range parameter on your report is a little tricky. You need to do some thing like this:
Minimum({?DateRange})&' thru '&Maximum({?DateRange})
 
Thanks, Charliy:

That works for regular parameters.

Unfortunately, this must be a Command Parameter, so it's a different scenario.

Thanks for your feedback, though!
 
I would create just two parameters - one for start date and one for end date. Then I would setup the filter in the where clause like this:

((Table.Field1 >= {?Start Date} and Table.Field1 <= {?End Date})
or
(Table.Field2 >= {?Start Date} and Table.Field1 <= {?End Date}))

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top