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!

Dynamic Field Sort By Clicking Field Name

Status
Not open for further replies.

gonetkeygo

Programmer
Jan 21, 2002
15
US
I am using Crystal Reports 10, and i would like to be able to dynamically sort the report based on user input. For example, a user runs the report and gets back a report with 5 fields sorted by the first field. The user then clicks the 2nd field header and the report displays sorted by the 2nd field. The user then clicks the 5th field header and the report displays sorted by the 5th field.

I know that i could just re-submit the report, but i was wondering if there was a better way internally inside the report to reset the sorting.

Thanks,

Joe C
 
Hi

Have you thought of creating a parameter that allows the user to choose which field to sort by at run time?
 
No, there is no way to sort by clicking on the header.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
thanks for the quick replies. I was hoping to avoid having to re-submit the report each time that the sort order was changed, but that doesn't look like an option.
 
You could set up the column headings of all but the first field as on-demand subreports which would then take the user to the same report, but sorted in a different way. They would have to return to the main report tab each time to do a different sort, however, since subreports cannot be nested within subreports. You would need to name the subreports with the column heading.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top