Grouping and Sorting in Reports

david.weeksdavid.weeks Member Posts: 96
edited 2004-05-19 in Navision Attain
Hi All

I have a report that has Item has the first data item and item ledger entries at the second data item that is indented.

I want to generate the report firstly by GPPG from Item and then by Location from Item Ledger Entry.

I have got the report subtotalling by GPPG but I cannot find a way of grouping by GPPG and then Location because Location is only available from the second data item.

Any ideas?

Comments

  • hansfouserthansfousert Member Posts: 46
    Hi David,

    I guess that you grouped the Item table by using GPPG in "GroupTotalFields" and GPPG as the Key in DataItemTabelView?

    These 2 properties are exactly what you need to group in a report: the field(s) must be available as a sorting/key, and you need to declare as a grouptotalfield.

    When you take a look at the keys of ILE you will see that Location is not available in a key (to be more specific: you would need Item no, Location).

    There are several ways to solve this:
    - add a Key to the ILE-Table, or ask your NSC to do this for you
    - change your report: add the Location table as a new DataItem. It would go between Item and ILE. Thus the report will go through Item, for every Item go through all Locations, and for every Location go through all ILE. Please be aware that you will need to enter a SETRANGE or SETFILTER in the OnPreDataItem-trigger to get your filters right: Item no. and Location
    And in case you would need some totals per group (item no. or location) you will need to add a CREATETOTALS-command too

    Does this help?
    Kind regards,

    Hans Fousert
    Microsoft Certified Trainer and Jet Reports Certified Trainer
Sign In or Register to comment.