Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Omit Record By Employee Post Reply Post New Topic
Author Message
jgarner
Senior Member
Senior Member


Joined: 23 Jan 2009
Location: United States
Online Status: Offline
Posts: 159
Quote jgarner Replybullet Topic: Omit Record By Employee
    Posted: 15 Aug 2011 at 8:18am
I have a report that displays employees (EMPLOYEE) that work at particular school sites (SCHOOL) with the dates and hours worked. What type of formula do I need to eliminate the school record from my report if a certain employee hasn't worked there yet?
 
Would this be an 'IF' / 'THEN' statement?
 
Thanks for your help
Crystal Reports Xl
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 15 Aug 2011 at 10:56am
How is your data set up?  By that I mean tables and joins.  Assuming you have three tables that do the following:
 
Employee - general employee info.
Employee School Assigments - list of schools the employee works at.
Employee Time - the dates and hours worked at a school.
 
I would inner join from Employee to Assignments and from Assignments to Time.  This will prevent any records where an employee may be able to work at a school but hasn't had any actual time there yet.
 
-Dell
IP IP Logged
jgarner
Senior Member
Senior Member


Joined: 23 Jan 2009
Location: United States
Online Status: Offline
Posts: 159
Quote jgarner Replybullet Posted: 15 Aug 2011 at 11:27am

There are only three tables:

LABOR.LABORCODE = General Employee Info, labor code
LABTRANS.REFWO = Employee labor code, date, time, refnum
WORKORDER.WONUM = Work order (wonum) to track school labor
 
These are all linked inner join, laborcode to laborcode, refnum to wonum.
 
I can view all of the records. I have these grouped by school which are displayed in the Group Header, and in the Detail row I have the employees. I can retreive and view all of the records. However, I would like to remove a school from the report if a specific employee hasn't charged any time to it.


Edited by jgarner - 15 Aug 2011 at 11:27am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.