I want to show the beginning balance based on a starting date of a check date range in the report query. How would the value from the query field be used?
Example:
I want to show a running total of accrued vacation hours from each pay period. I need the beginning balance to include the Vacation Carry Forward and all used and accrued vacation from the payroll records prior to the check date provided in the query. Here's what I have so far--the blank is where I need help. Blank = Queried Starting Check Date
Calculated Field:
Name: payrec^vacbal
Description: Accrued Vacation Balance
Calculated Field Expression:
employ.vacbeg - [SELECT payrec.vachrs FROM payrec WHERE payrec.chkdte < {_____________} and payrec.empnum = {payrec.empnum} ] + [SELECT payrec.accvac FROM payrec WHERE payrec.chkdte < {_____________} and payrec.empnum = {payrec.empnum} ]