Report - If null set the text boxes visible to false

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

Guest

I have a report which displays the hours worked on a project or category. It
gets the information from a time card table which has the field names
Category Name Text
Project Name Text
Hours Number

Either Category Name is null or Project Name is null for every record.
Now i want my report to display all the hours worked on the category/project
names, so that it looks like this.

Vacation 5
Health Management 10

However im having probelems because my report displays the hours for all the
records even if there is a null record for the Category Name or Project Name.
I guess I want to know if there was a way that I can set the hours visible to
false when project name/category name is null.

I have tried seprating the time card into 2 but then other problems arise
when i try to combine the two time cards into one report.

If anyone can help i would greatly appreciate it.
Thanks
 
Tanhus,

I think your difficulty arises from having a Category Name and Project Name
in the same record. Since both have the same relationship to Hours, they
really are the same conceptual "thing", a WorkActivity.

Restructuring the data would avoid this dilemna:

WorkActivityTypes
-----------------------
WorkActivityTypeID AutoNumber (Primary Key)
WorkActivityType Text (Admin, Projects, etc.)

WorkActivities
-----------------------
WorkActivityID AutoNumber (PK)
WorkActivityTypeID Integer (Forieng Key to WorkActivities)
WorkActivity Text ("Vacation", "Health Management")

EmployeeWorkRecords
---------------------------
EmployeeWorkRecordID AutoNumber (PK)
WorkActivityID Integer (FK to WorkActivities)
EmployeeID Integer (FK to Employees)
Hours Integer

Alternatively, you could skip the "WorkActivityType", and use a
non-AutoNumber PK for WorkActivities, and use a range of WorkActivityID
values for Admin and another for projects, e.g.:

Admin Categories 1-50
Projects >100

Hope that helps.
Sprinks
 

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