Help creating a report. How to implement logic in the report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I need to create a report that basically shows employees who have completed
something similar to a hiring process.

The criteria to indicate that the process has been completed is:
1. The presence of 4 dates in a table. The presence of each date
represents the completion of a single phase/stage of the hiring process.
2. Verified access to a number of applications, based on job title.

I do something very similar on a form using the OnCurrent event. I check
for the presence of each date and increment a counter for each date present.
Each job title has a set number of applications that the employee needs. I
check the number of apps needed, then compare that to how many apps have been
verified. If the two counts are equal (and <> 0) then all apps have been
verified. If all conditions are met, I display a lable indicating the
process is complete.

My report has all the necessary data, but I need to apply the conditional
logic so that I only get the records that meet the criteria.

I know this was pretty long-worded, but I wanted to explain this clearly.

Can anyone point me in the right direction?

TIA,
Rich
 
rich said:
I need to create a report that basically shows employees who have completed
something similar to a hiring process.

The criteria to indicate that the process has been completed is:
1. The presence of 4 dates in a table. The presence of each date
represents the completion of a single phase/stage of the hiring process.
2. Verified access to a number of applications, based on job title.

I do something very similar on a form using the OnCurrent event. I check
for the presence of each date and increment a counter for each date present.
Each job title has a set number of applications that the employee needs. I
check the number of apps needed, then compare that to how many apps have been
verified. If the two counts are equal (and <> 0) then all apps have been
verified. If all conditions are met, I display a lable indicating the
process is complete.

My report has all the necessary data, but I need to apply the conditional
logic so that I only get the records that meet the criteria.


You can use the same logic in the report's detail(?)
section's Format event.
 
Yes, but how?
There is no OnCurrent event. The only events are:
OnFormat
On
 
Yes, but how?
The only events are:
OnFormat
OnPrint
OnRetreat


As I understand the information provided in Access Help, neither of these
suffices.
The logic that I need to implement is:

Dim StepsComp As Integer 'This is the number of steps of the process
which are complete.
Dim txtVerifiedApplsCount As Integer
Dim txtPercentComplete

stepsCompleted = 0
txtPercentComplete = 0
txtVerifiedApplsCount = 0
StepsComp = 0
If Not IsNull(txtARFSubmitDate) Then
StepsComp = StepsComp + 1
End If
If Not IsNull(txtS3IDNotifyDate) Then
StepsComp = StepsComp + 1
End If
If Not IsNull(txtXEmailSetNotifyDate) Then
StepsComp = StepsComp + 1
End If
If Not IsNull(txtXEANSetNotifyDate) Then
StepsComp = StepsComp + 1
End If
txtStepsCompleted = StepsComp
txtPercentComplete = (StepsComp / 4)
txtVerifiedApplsCount = DCount("*", "tblEmplApplMapping", "S3ID = '" &
[txtS3ID] & "' AND [AccessVerified] = TRUE")
If ((txtStepsCompleted = 4) And (txtVerifiedApplsCount = txtTotalApps)) Then
lblProcessCompleteMsg.Visible = True
Else
lblProcessCompleteMsg.Visible = False
End If


Thanks,
Rich
 
rich said:
Yes, but how?
The only events are:
OnFormat
OnPrint
OnRetreat


As I understand the information provided in Access Help, neither of these
suffices.
The logic that I need to implement is:

Dim StepsComp As Integer 'This is the number of steps of the process
which are complete.
Dim txtVerifiedApplsCount As Integer
Dim txtPercentComplete

stepsCompleted = 0
txtPercentComplete = 0
txtVerifiedApplsCount = 0
StepsComp = 0
If Not IsNull(txtARFSubmitDate) Then
StepsComp = StepsComp + 1
End If
If Not IsNull(txtS3IDNotifyDate) Then
StepsComp = StepsComp + 1
End If
If Not IsNull(txtXEmailSetNotifyDate) Then
StepsComp = StepsComp + 1
End If
If Not IsNull(txtXEANSetNotifyDate) Then
StepsComp = StepsComp + 1
End If
txtStepsCompleted = StepsComp
txtPercentComplete = (StepsComp / 4)
txtVerifiedApplsCount = DCount("*", "tblEmplApplMapping", "S3ID = '" &
[txtS3ID] & "' AND [AccessVerified] = TRUE")
If ((txtStepsCompleted = 4) And (txtVerifiedApplsCount = txtTotalApps)) Then
lblProcessCompleteMsg.Visible = True
Else
lblProcessCompleteMsg.Visible = False
End If


OnFormat is an Event Property, you want to put your code in
the Format event procedure. In a vague sort of way, you can
think of a report's Format event as being analogous to a
form's Current event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top