SubReport Problem

B

bw

I have a MainReport, then a SubReport1 which is in the detail section of the
main report. The Main and SubReport1 are linked by CoName in the Master and
Child Fields.

SubReport2 is in the detail section of SubReport1, and they are linked by
CoName in the Master and Child Fields.

The Table these SubReports use has two types of records (specified by a
yes/no field, [BType]).
Values for the [BType] = Yes, is Flat Rate billing charge information.
Values for the [BType] = No is for a Per Unit billing charge information.

In SubReport1, I want to print only the [Btype] = Yes records. There is no
Criteria specified for SubReport1.
In SubReport2 I want to print only the [BType] = No records. The Criteria
for SubReport2 is [BType]=No.

My MainReport is working fine but for one (big) problem:

1. If SubReport1 has no [BType] = Yes records, then nothing gets printed for
SubReport2.
How can I avoid this problem?

Suggestions and/or guidance will be appreciated.

Bernie
 
M

Marshall Barton

bw said:
I have a MainReport, then a SubReport1 which is in the detail section of the
main report. The Main and SubReport1 are linked by CoName in the Master and
Child Fields.

SubReport2 is in the detail section of SubReport1, and they are linked by
CoName in the Master and Child Fields.

The Table these SubReports use has two types of records (specified by a
yes/no field, [BType]).
Values for the [BType] = Yes, is Flat Rate billing charge information.
Values for the [BType] = No is for a Per Unit billing charge information.

In SubReport1, I want to print only the [Btype] = Yes records. There is no
Criteria specified for SubReport1.
In SubReport2 I want to print only the [BType] = No records. The Criteria
for SubReport2 is [BType]=No.

My MainReport is working fine but for one (big) problem:

1. If SubReport1 has no [BType] = Yes records, then nothing gets printed for
SubReport2.
How can I avoid this problem?


That's the logical outcome for that arrangement. I seems to
me that subreport2 should be in the main report's detail
section.

Actually, if subreport1 and subreport2 are only different in
that criteria, then you can do it all with one subreport by
sorting on the btype field before any other sorting.
 
B

bw

Marshall Barton said:
bw said:
I have a MainReport, then a SubReport1 which is in the detail section of
the
main report. The Main and SubReport1 are linked by CoName in the Master
and
Child Fields.

SubReport2 is in the detail section of SubReport1, and they are linked by
CoName in the Master and Child Fields.

The Table these SubReports use has two types of records (specified by a
yes/no field, [BType]).
Values for the [BType] = Yes, is Flat Rate billing charge information.
Values for the [BType] = No is for a Per Unit billing charge information.

In SubReport1, I want to print only the [Btype] = Yes records. There is no
Criteria specified for SubReport1.
In SubReport2 I want to print only the [BType] = No records. The Criteria
for SubReport2 is [BType]=No.

My MainReport is working fine but for one (big) problem:

1. If SubReport1 has no [BType] = Yes records, then nothing gets printed
for
SubReport2.
How can I avoid this problem?


That's the logical outcome for that arrangement. I seems to
me that subreport2 should be in the main report's detail
section.

Actually, if subreport1 and subreport2 are only different in
that criteria, then you can do it all with one subreport by
sorting on the btype field before any other sorting.

Thanks again, Marsh!

I experimented with your suggestions and found that placing SubReport2 in
the CoName Footer on the main report did the trick for me.

Bernie
 

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