×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Sorting records dynamically from VB5

Sorting records dynamically from VB5

Sorting records dynamically from VB5

(OP)
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!

RE: Sorting records dynamically from VB5

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
http://www.kenhamady.com/
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.

RE: Sorting records dynamically from VB5

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
http://www.kenhamady.com/
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close