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

Sorting records dynamically from VB5

Status
Not open for further replies.

Beaner5434

Programmer
Jul 18, 2001
12
US
I am developing an app in VB5 that uses an interface to determine which records will appear on the report. All the records are in a single table. I want to give the user the option to sort the records on one of five fields: Date Entered, Date Due, Date of Service, Date Received, or Patient Name. I have the report producing the correct records by passing a string to the SelectionFormula aspect of the VB5 Crystal control, but I cannot figure out how to set the Sort order. I tried including ORDER BY {field name} in the SQL string, but that crashed and burned, something like {ReportInfo.CaseGroup}=1 ORDER BY {ReportInfo.DateRecd}. I'm thinking it's something simple, and I'm just not seeing it. Any suggestions or guidance you can offer would be greatly appreciated!
 
You can put a formula field into the report with the contents of {DueDate}, sort on that formula field, and then pass the formula the appropriate field name from your app. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
You can also set the sort field directly with a command from the app, but the command varies with the integration method you are using. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top