Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2005
    Posts
    5

    Question Unanswered: sorting on different field than group by (Crystal report 8.0)

    I have a report in crystal report 8 in which i used the group by option. The fields in the report are :

    Item Code , Item Name, Opening, Received, Issued, Closing Balance

    I group this report by Item Code, as I want the sum of all these fields for an item. I have suppress the Detail section and only showing the group footer where sum of all these fields are showing. This report is working perfectly but now I want to sort this report by Item Name or Closing Balance. It seems to be very difficult as i cannot change the group as it must be on item code and if use sort records command it is not effective as group sorting is on priority.

    So is there any way that remaining the group on Item Code I can change the sorting order to some other field?

    Please help!

  2. #2
    Join Date
    Feb 2005
    Posts
    5
    No Body Replied As Yet. Please help as I need Urgent Help!

  3. #3
    Join Date
    Oct 2003
    Posts
    357
    Hi,
    If you use group then record sort will be based on the group. If you sort the records by ItemName then within each group sorting will be done and not as a whole
    Madhivanan

    Failing to plan is Planning to fail

  4. #4
    Join Date
    Feb 2005
    Posts
    5
    SO that means there is no way???

  5. #5
    Join Date
    Oct 2003
    Posts
    357
    Yes I think so
    Madhivanan

    Failing to plan is Planning to fail

  6. #6
    Join Date
    Jan 2005
    Location
    Avon Lake, OH
    Posts
    112
    Usually the simplest solution is to perform the grouping / summarizing at the server side (e.g. using SQL Server stored procedure, Access query, etc.), and then use the stored procedure or query as the source for the data.

    An alternative that I read about is to create global variables in the report, assign the values to these variables using 'WhilePrintingRecords;' in formula fields, and passing these variables through to a subreport that then does the actual reporting for you.

    The example was for Crystal 9, so I don't know whether this works in Crystal 8. Look at http://support.businessobjects.com/c...portdesign.pdf
    for a document with links to various Crystal Report solutions, or go straight to http://support.businessobjects.com/c...e_formulas.pdf
    for the document specific to this.

    Good luck!!
    Barry

  7. #7
    Join Date
    Mar 2011
    Posts
    1

    Group by both

    Set Group 1 as Item Name, then Group 2 as Item Code. Suppress both the header and footer for Group 1. Crystal will apply the first sort to Item Name, then group on Item Code. This will only work if the Item Name is always the linked to the Item Code.

Posting Permissions

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