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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Skip pages where total = 0.00

Status
Not open for further replies.

kmclane

Technical User
Apr 14, 2004
321
US
I have a report that is printing a page of totals. Probably 65-70% have no total, which is fine, but I would like to have the report only print the ones with a balance. Each page is one record from a table, plus several calculated controls. Should I go back to the creation of the table and limit the records there? or is there a way to tell the report to not print these? The problem is all my totals are calculated on the report, they do not exist in the table. Each total field is calculated from 5 or 6 fields, and the GTs are calculated from the total fields. I have 24 total fields on the report.
Thanks, Ken.

- If you are flammable and have legs, you are never blocking a fire exit.
Mitch Hedburg
 
I would create a query using your table as input with all the calculated columns necessary and eliminate those that total to zero. Then use this query as imput to your Report.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
I Can't do that, I would end up with 249 fields and my query would bomb out, I've tried. I had to eliminate the total fields to get the query to run.
Ken.

- If you are flammable and have legs, you are never blocking a fire exit.
Mitch Hedburg
 
I sense that there can be one particular calculated total that is driving whether to print the page or not, yes??? Why not take the table in a query with all of the fields necessary for the report(like you are doing now) and just add the enough of the calculated values to determine if this record should be printed. There has to be a small number that would indicate that I assume. Then use the criteria of this query to not select these records. This would allow you to not have to change your report but just add a small number of calculated columns to your query.

Let me know if this idea is possible. I don't know the specifics of your calculated controls but I can't image that you are using them all to determine a black detail record.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Yes, this is probably the route I will have to take. It will probably be easier to modify my original query, which creates the table, then I won't need to modify the fields in my report. The original table it is querying has 249 fields, but it includes total fields. I should be able to exclude any row with a zero in the total count.
Thanks, Ken.

- If you are flammable and have legs, you are never blocking a fire exit.
Mitch Hedburg
 
Ok, that worked great! got it down to 24 pages from 66. Two more reports like that to go, then on to all the other neat stuff.
Ken

- If you are flammable and have legs, you are never blocking a fire exit.
Mitch Hedburg
 
Great!!! [2thumbsup] Shot in the dark hit the mark. Good luck with your project.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Yes, I still have to edit about 120 controls on each report to calculate from my new table. I love drudgery! But once it's done I can reuse the report every month.
Ken

- If you are flammable and have legs, you are never blocking a fire exit.
Mitch Hedburg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top