How to Use Query Input in a Calculated Field

SUGGESTED

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} ]

Parents Reply Children
  • 0 in reply to Char DeLange

    I don't see any reports in 5-1-5 Workers Comp Reports that I can use for this project. I did find reports in 5-1-8 Hours Report form #81 and #86. However these reports are very simply and only offer employ number filtering—missing status and date options. Also, there is not an option for printing separate reports by employee number. I am looking for a combined report of vacation and sick to run each quarter for current employees that is separated by employee number.

  • 0 in reply to Neil Macernie

    My apologies I did mean 5-1-8 but was answering from my cell.  If you don't select an employee it does give them all to you by employee number.  It would just be a separate report for vacation and one for sick.