Subreport information not printing when Report empty

M

Maureen227

Hi
I have a report that has a subreport. The problems is that if the main
report does not have any data ( which is OK sometime), the subreport
items will not print.

The subreport is linked to the main report by its invoice number.

Any suggestions will be helpful.

Thanks
Maureen
 
K

Ken Snell \(MVP\)

If the main report has no data, it therefore has no value for invoice
number, which the subreport needs for its records. Therefore, the subreport
has no records and it also doesn't print.
 
M

Maureen227

Ken
Thanks for the quick reply.

That makes perfect sence, I should have realized it.
Do you have any suggestion how I can get around this problem. In code
or query? I tried a couple of thing but without success.

Maureen
 
K

Ken Snell \(MVP\)

What type of data would the subreport be displaying, if the subreport is
based on invoice number, when the main report has no data? Tell us more
details about what you're wanting to do.
 
M

Maureen227

That would be Great! here it is

The main report has all the heading information, ie customer name
address etc and Invoice number.

Three subforms:
One has equipment charges for that invoice
One has labor charges for that invoice.
The last has the totals for the invoice

There are times when the invoice has only equipment charges and no
labor chagre. This prints ok.

There are times when the invoice has labor charges and no equipment
charges. The labor charge information will not print and the totals
subform returns error,

When the invoice has both labor and equipment charges the invoice is
beautiful.

Orginally, the equipment charges data was in the query with the invoice
header. After your first post I now I have created a query and a
subform for equipment and a query and subform for labor. Both subforms
are linked to header information through the header query containing
the invoice number parameter that the report is built on. The header
query has the invoice number.

The header, labor and equipment data are stored in tables with one to
many relationships. Header is the one and labor and equipment are the
many. Labor and Equipment have no direct relationship.

Hope this makes sence. Any help would be appreciated.

thanks
Maureen

PS Is there a great functionality difference in using subforms on a
report rather than subreports?
 
K

Ken Snell \(MVP\)

Maureen227 said:
PS Is there a great functionality difference in using subforms on a
report rather than subreports?

Do not use subforms on a report; use subreports.
 
M

Maureen227

Ken said:
Do not use subforms on a report; use subreports.

Thanks Ken, that is what I did and it worked. Again thanks for your
help. You folks have saved my sanity more times than I can count. :)
Maureen
 

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

Top