I am working on the Time Journal Test Report: I want to group by payroll control code and get total hours for each, I then want to get total hours for the Employee, disregarding the Payroll Control Code. I have set the DataItemTableView Property of the Time Journal Line Data Item to SORTING(Journal Template Name,Journal Batch Name,Employee No.,Payroll Control Code,Job No.) I have added Payroll Control Code and Employee No. to the GroupTotalFields Property of the Time Journal Line Data Item. I have two Groupfooters for the Time Journal Line Data Item. On the first Groupfooter I am getting a total for Payroll Control Code, which is as I whis. But the second Groupfooter gives me a total for each Payroll Control Code instead on one total for the Employee. I have tried putting the Employee Total in a Footer section and it doen’t work either. Any ideas on how to accomplish this?
In the OnPreSection trigger of the second GroupFooter, you need to include code that looks something like the following:CurrReport.SHOWOUTPUT := CurrReport.TOTALSCAUSEDBY = "Time Journal Line".FIELDNO("Employee No.");
Here’s how I figured this stuff out: Create a report using the wizard and specify the grouping and totaling you want – the wizard automatically creates the ‘magic’ code required in the OnPreSection triggers.
Thanks Fritz, The report works perfectly now. I think I need to use the Report Wizard more.