0
votes

I am using Crystal Reports 2008.

I would like to be able to use a parameter to prompt a user how he/she would like a date group grouped. In other words...I have an order date that is currently grouped 'for each month'. I would like to give the user the option to select how they want the date group to be grouped using a parameter, (for each day, for each week, or for each month). does anyone know how to do this?

Best regards to all.

Roger

2

2 Answers

0
votes

depending on the viewer your users are using, there are some options. Our users use a program called DataLink Viewer by Millet Software, and there is a great way of creating "Click to Sort" reports. Please take a look here and look for the click-to-sort ability starting on page 65. For other Viewers, you could create a parameter for the sort. Then create a formula that looks something like If {SortParameter} = "Year" then (Year{mytable.datefield}) else if {SortParameter} = "Month" then (Month{mytable.datefield}) etc. Then you will have to make the formula your group and sort by it. You could also create another formula that will dynamically create a label for the Group Header to show "Year" or "Month" or "Day".

Hope that helps,

Chris

0
votes

Here are a couple of video demos of click to sort and group swap expert in DataLink Viewer: Group Swap Expert Click to change View/Groups