Does anyone know if and how it would be possible to set a parameter option in Crystal reports 10 to allow a user to specify whether the report should sort in date or alphabetical order?
The standard solution is to define a formula field. Use a parameter to choose either a date field or an alpha. Define the field using Reports > Sort Expert.
You may need to use ToText to define the date as text, something like ToText({your.date}, "yyyy/MM/dd")
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10
The parameter is appearing blank. Should it allow the user to choose date or street?
I've created a new parameter, called 'sort', the value type is String, in there i have entered two values manually; Street and Date. Have i done this correctly?
You should be adding the text "Street" and "Date" (no quotes) as your value fields in the parameter setup screen which for this example we will say you called "Sort". You shouldn't be using the browse feature at all. Then you must add your formula:
If {?Sort} = 'Date' then
totext({table.date},"yyyyMMdd") else
{table.street}
...to field to report->sort records. Then when you refresh, you should see "Date" and "Street" in the parameter selection screen as options for your parameter {?Sort}.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.