Results 1 to 3 of 3

Thread: crystal group by

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    crystal group by

    Is there a way to override the sort by order of a group created on a crystal report?
    It's tough being an unhandled exception...

    ___________
    VB.NET 2008
    VB.NET 2010
    ORACLE 11g
    CRYSTAL 11

  2. #2
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354
    Well since Crystal Report questions seem to go unanswered quite frequently on this forum I will take a stab at it. I have never been able to find an official way to over ride the order but I have come up with a hack that may work for you.

    For instance, say that you have a report based on an Employee Number where you need to group by the employee number but you want to print out the report sorted in alphabetical order using the employee’s last name.

    You can create a formula field using the values of combined fields like this:

    {tblEmp.LastName} & " " & {tblEmp.FirstName} & " " & {tblEmp.EmployeeNumber}

    Now all you need to do is group by your formula field. This way allows you to combine the Unique or Key field (in my example the EmployeeNumber field) with the first and last name of the employee that may not necessarily be unique into one new field that will definitely be unique. You are still grouping by the employee number but you are using the last name for the sort order.

    I hope I understood your question correctly and that this answer makes sense.
    Last edited by BukHix; Jul 1st, 2004 at 09:54 AM.

  3. #3

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075
    thank you BulHix...I've been banging my head for a while on this one...
    It's tough being an unhandled exception...

    ___________
    VB.NET 2008
    VB.NET 2010
    ORACLE 11g
    CRYSTAL 11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width