Report printing row with zero values from subform

morganpeet

Registered User.
Local time
Today, 23:46
Joined
Mar 26, 2009
Messages
14
I am printing a report Invoice from a form with a subform. When I enter the invoice details on the subform (Datasheet) it automatically enters a blank row which then in turn prints out on the invoice report. I have a comand button from the form to print the invoice. How can I tell the report not to print rows with 0 as a value?
 
1. that is probably default values showing up for what would be a new record if you added one.

2. You should be creating a report for printing as forms are not very good for printing and you have little control over how things look for printing, whereas with reports you do have a lot of control over that.
 
Sorry I didnt explain myself very well. I am printing a report based on Invoice detail table. The subfrom is automatically adding a blank row to the Invoice detail table so that is showing up on the report. Hope that makes sense!
 
Sorry I didnt explain myself very well. I am printing a report based on Invoice detail table. The subfrom is automatically adding a blank row to the Invoice detail table so that is showing up on the report. Hope that makes sense!

Actually, perhaps if you uploaded a couple of screenshots showing the problem it would help better (I'm way more "visual" with this stuff). :)
 
I know this might sound really thick - but how do I upload screenshots? I pressed print screen but couldnt paste it in?
 
I know this might sound really thick - but how do I upload screenshots? I pressed print screen but couldnt paste it in?

You open MS PAINT and paste it there and the use File > SAVE AS to save as a jpg, png, etc. and then you attach that file.
 
form view.jpg

reportview.jpg

Hope this works
 
Ah, that helps. I think, if you go into your table you will find an "orphan" record. You should be able to delete it and then things should be back to normal.
 
The form is a data entry form where i enter the invoice details. For every invoice I enter on the form it adds a blank row for each invoice no. I just deleted all the table info to start again and the very first invoice I entered it entered a blank row with 0 values.
 
The form is a data entry form where i enter the invoice details. For every invoice I enter on the form it adds a blank row for each invoice no. I just deleted all the table info to start again and the very first invoice I entered it entered a blank row with 0 values.

Then something is messed up for your subform. The next thing I would say, is can you compact the database (Tools > Database Tools > Compact and Repair) and then zip with WinZip or Windows and upload it here?
 
this is a work in progress so some things aren't set up properly yet!
That is an understatement. We can't fix your issue until we get this all normalized and the correct indexes and keys in place. I've been working on it for a bit but it is quite a bit of work.
 
Thanks for your reply. I would appreciate any help you could give me and any pointers as to where I am going wrong!!!
 
Hi, I still haven't got rid of my extra line of zeros? Can anyone help?
 
I have tried everything and the subform is still adding an extra line of zeros into the original table and so printing out a blank on the report. Can somebody please help me?
 
if you are using a query as your recordset, then that will be where the problem lies. In my experience it is usually the join type. Experiment with the different join types.
 
You have some Default value in the subform which is dirtying the record
 
Your problem is that on form ORDER ENTRY, you have tblInvoices as the recordsource and then you have a subform with the same table as the recordsource. That is your problem. You don't have a subform and a mainform with the same, exact, recordsource. Your INVOICE DETAILS should be a completely separate table (hence like I said previously, your design is very flawed and should be redesigned to be normalized) from the main invoice table.
 

Users who are viewing this thread

Back
Top Bottom