|
Main report consists of a table showing hours posted, there are numerous rows for each DAY for the Group2 (person)
Subreport consists of a table showing hours paid for a WEEK. There is one row of data with each Saturday's date for each person.
To eliminate the duplication (x7) of rows of data in the main report, I separated the hours paid for a week into a subreport and linked the Saturday date in Subreport to the Main Report formula @WeekEnding. The persons' names are also linked.
Everthing works fine.
Now, I need to create a formula which takes @HrsPd in the Subreport and divides it by the Sum of the hours posted in the Main Report. so I created the variable HP
In Subreport @HrsPd Shared NumberVar HP := {Table_.Non_Vac_Hrs};
In Main Report @HrsPd Shared NumberVar HP ;
in the Main Report GF2 the result is the @HrsPd for the Previous Group (and the first Group is Zero)
Example:
Name...Main...Subreport @HrsPd @HrsPd Bob.......0.........40 Sam.....40........32 . . . . . . . 32 is correct, 40 is for the previous Group 2 Fred.....32........38 Joe.......38........45 Tom.....45........40
|