-
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
-
Re: Grouping and sorting
can you post your code for us to see and maybe can help you
-
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