Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can you blank out a line when there is no data?

Status
Not open for further replies.

shanl

Technical User
Apr 2, 2007
41
US
I am printing totals and description of the activity for a person's payroll activity. There are approximately 20 different categories that a person can post time to which I need to calculate to determine if he took any of this other time. There are too many misc categories to have them as headings across the top so I was hoping to print only the ones that pertain to that person during that payroll period. e.g.

Desc Code Hrs used
Funeral 023 0 hrs
Military 082 8 hrs
LWOP 099 0 hrs
Jury duty 080 0 hrs
FMLA 045 0 hrs
etc...

On the report I would like it to only print what was used
so in this case it would be

Military 082 8 hrs

Does anyone know how to accomplish this?

Shan
 
What application?

_________________
Bob Rashkin
 



Hi,

If this is Excel, check out either the AutoFilter or Pivot Table reports.

Skip,

[glasses] [red][/red]
[tongue]
 
This is an Access application, using SQL Server tables as input and Visual Basic code.
 



Then its a Query the the appropriate Where clause criteria

Skip,

[glasses] [red][/red]
[tongue]
 
Skip,
I didn't think you could have queries in REPORTs? (I'm new to Access so my assumptions may be incorrect). This is the part I need a little jump start on. Are you saying that you can add the query on the propery for each field on the report?
Shan
 
Isn't the RecordSource of your Report a query ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PH,
Yes, the record source is a Query. In that query I have added many additional calculated queries for purpose of reporting the hrs worked in the right category. Unfortunately all the info for a person's pay period is written to as few as 14 records to as many as 50 records for one person for one pay period. This report is to summarize all of those details into one line. There are no grand totals on any of these detail records. So on my report, I have a detail section where I'm reading in all my detail records (but have made that part invisible). In my section where I group by a person's name, I am summing up all the detail totals. This is where I need help on how can I add criteria in this section to prevent printing a line if the total number of hours is 0? Is there a way to add that on the PROPERTY? or is there some other technique. I feel like I'm missing the obvious by your questions but the light bulb still hasn't come on.
 



Just add the criteria to your report query to return [Hrs Used]>0

Skip,

[glasses] [red][/red]
[tongue]
 
The bulb is still off. Sorry for my denseness. Every single record I get always has hrs >0. Below is a sample

Joe Blow - OT 2 hrs (Reports) 4/18/07
Joe Blow - Worked Shift 2 8 hrs 4/18/09
Joe Blow - Vac 8 hrs 4/19/07
Joe Blow - Ill 8 hrs 4/20/07
Joe Blow - Worked his shift 8 hrs 4/21/07
etc.

So when I process Joe Blow's record and I've calculated all my counts for the 4 things that he worked and there are zeros for all the other categories that he didn't work how do I prevent the line's that I have formatted and ready to print from showing up on the report? These lines have not only zero hours associated with them but Textual description. e.g. I know at this point I don't have hrs for Funeral. How do I prevent this line from printing?

Funeral - Code 023 0 hrs
 
Where is "Funeral - Code 023" come from ? Hardcoded in the section ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PH,
Yes, All the textual descriptions about the other categories are hard coded on the report in text boxes.
Shan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top