Complex Grouping

How to make complex grouping in report? I mean to group data on many levels. For example: FA Class Code: 1 Resp. Emp.: AA FA No.: FA001 FA002 BB FA003 FA004 2 CC FA005 FA006 etc.

I am often using temporary tables to “collect” and group data into and then read and print from the temp.

the matter is that I don’t need to collect data from different tables - it’s a single table containing all necessary data. I just need to group it by many levels, like in my example(table 5600 - 1. Assets by class; 2. Assets by responsible employees within a class

As long as your groupings follow a selected key structure, you can use group footer and group header sections combined with some code. I understand your groups are: 1==: FA Class 2==:==: Responsible Employee then actual FA Nos. Based on this, you need property group total field set to FA Class, Responsible Employee, select a key that has the fields in the same order and create two group headers in the report with the following code: OnPreSection() CurrReport.SHOWOUTPUT := CurrReport.TOTALSCAUSEDBY = FIELDNO(“FA Class Code”); and “REsp. employee” respectively. Same works for the group footers. Alex

For grouped reports, the Report Wizard is a wonderfull tool to use to get most of the hard work done up front. I’d suggest you start there. If you choose to write it from scratch you will need (as mentioned above) to be very carefull in the Key that you select as unexpected results can happen if you group on a field and it is not properly ordered in the key. Also, the group headers and footers will fire (or print) after each record unless you add in a line of code like: CurrReport.SHOWOUTPUT := TOTALCAUSEDBY = FIELDNO(MyGroupField); Bill Benefiel Manager of Information Systems Overhead Door Company (317) 842-7444 ext 117