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!

Displaying part of the record selection criteria 1

Status
Not open for further replies.

TGHaddon

IS-IT--Management
Dec 19, 2003
12
GB
Using Crystal Reports 8.5.

I want to display the date range that is used in a report at the bottom of the page.

I have found the special function that displays the record selection criteria formula but this is no use to me as I want to show just one of the criteria that is set rather than all the elements of the formula.

Is there a way of adjusting the special function or a formula that does the same thing in a more flexible way?

Tim
 
Hey Tim, you have a single parameter for date that is a range right?

If so, create a formula called DateDisplay. We will assume your dateParameter is call DateRange.

Your DateDisplay formula should look like this


"From " & minimum({?DateRange}) & " To " & maximum({?DateRange})





 
That looks like it should do the job, however the formula editor doesn't recognise From as a function (i.e. it doesn't go blue) when I check the formula I get a remaining text does not appear to be part of the forumal error.
 
That looks like it should do the job, however the formula editor doesn't recognise From as a function (i.e. it doesn't go blue) when I check the formula I get a remaining text does not appear to be part of the forumla error.

Any ideas?
 
The From needs to be in quotes. The From is just so when it displays on the report it will look lie this -

From 12/01/2006 To 12/05/2003.

From and To are just literal text fields

"From " & minimum({?DateRange}) & " To " & maximum({?DateRange})

Write it EXACTLY like that. Then put it in your report header or page header.
 
Aha, that'll teach me to make assumptions about how that was going to work - perfect now, cheers.
 
You need to convert the dates to test. Try it in this format.

"From " & ToText(minimum({?DateRange}),"mmmm d, yyyy") & " To " & ToText(maximum({?DateRange}), "mmmm d, yyyy")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top