A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old October 29th, 2007, 07:42 PM posted to microsoft.public.access.reports
Rich
external usenet poster
 
Posts: 508
Default Help creating a report. How to implement logic in the report

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
  #2  
Old October 30th, 2007, 05:05 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Help creating a report. How to implement logic in the report

rich wrote:
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.

--
Marsh
MVP [MS Access]
  #3  
Old October 30th, 2007, 05:41 PM posted to microsoft.public.access.reports
Rich
external usenet poster
 
Posts: 508
Default Help creating a report. How to implement logic in the report

Yes, but how?
There is no OnCurrent event. The only events a
OnFormat
On


"Marshall Barton" wrote:

rich wrote:
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.

--
Marsh
MVP [MS Access]

  #4  
Old October 30th, 2007, 05:50 PM posted to microsoft.public.access.reports
Rich
external usenet poster
 
Posts: 508
Default Help creating a report. How to implement logic in the report

Yes, but how?
The only events a
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



"Marshall Barton" wrote:

rich wrote:
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.

--
Marsh
MVP [MS Access]

  #5  
Old October 30th, 2007, 08:03 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Help creating a report. How to implement logic in the report

rich wrote:

Yes, but how?
The only events a
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.

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.