Results 1 to 3 of 3

Thread: Grouping and sorting

  1. #1

    Thread Starter
    Hyperactive Member yousufkhan's Avatar
    Join Date
    Jan 2002
    Location
    India
    Posts
    492

    Grouping and sorting

    I a having 2 table in sql 1 mst and 2 dtl

    master is having(single record for itemcode)
    itemcode,itemtype,itemname

    detail is having(multiple records for singel itemcode)
    itemcode, qty,

    i am creating a report with itmecode ,itemtype, itemname, and the qty will be sum of multiple record from detail
    the report should be group on itemtype, and itemcode is for sum(qty) from detail i dont want detail in report but the sorting order i want to have
    itemtype,itemname

    but when i am having gorup on itemtype ,itemcode the sort order is also
    itemtype ,itemcode even if i change in sql query order by itemtype ,itemname
    when is restart the report it comes back to itemtype, itemcode

  2. #2
    Addicted Member
    Join Date
    Jun 2006
    Location
    Virac
    Posts
    129

    Re: Grouping and sorting

    can you post your code for us to see and maybe can help you

  3. #3
    Addicted Member mabbas110's Avatar
    Join Date
    Oct 2005
    Location
    Karachi , Pakistan
    Posts
    172

    Re: Grouping and sorting

    Hello,

    u can do one thing first for getting sum ( qty )
    u inser a group field either item code or item name , but the group field will be order by and u can not change the order by sequence.
    however u can me change of the second preference

    if u dont not want to show the detail of each record but on the item code , item name and sum(quantity) , so shift the fields from detail tab to group footer tab and make suppress the detail column,

    your problem will get solved

    but for order by , crystal reports order by default with group by column
    Thanks and Regards,

    Muhammad Abbas

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