No Record Reports

A

Al Camp

I have a report with 2 subreports... it's a basic billing system.
rptBalanceForward - displays a balance due as of one month before the "user
entered" current Billing Date
rptChargesThisPeriod - displays charge and credit transactions for the last
month before Billing Date

rptBalanceForward is located just above rptChargesThisPeriod.

Often, no records meet the criteria in the Balance Forward supreport, so it
comes up empty, and displays nothing. There are ChargesThisPeriod amounts
to display, and they do... but with an empty space above, due to the empty
sub.

Customer ID is the field that links both subreports to the main form.
Fields in sub rptBalanceForward...

AsOfDate (unbound Calc - User entered BillingDate-1 month)
Transaction (label - "BalanceForward")
Amount (bound calc - =Sum(Amount) - Format nulls as .00)
CustomerID (bound - [CustomerID] - key/link field)

Tried "OnNoData", On Print, IIF(IsNull...), etc... to force a display, but
no luck.

Can someone offer some tips or tricks on how to force a rptBalanceForward
record to display as (ex.)
7/14/05 Balance Forward 0.00
if no records meet the criteria?

Thanks in advance,
Al Camp
 
M

Marshall Barton

Al said:
I have a report with 2 subreports... it's a basic billing system.
rptBalanceForward - displays a balance due as of one month before the "user
entered" current Billing Date
rptChargesThisPeriod - displays charge and credit transactions for the last
month before Billing Date

rptBalanceForward is located just above rptChargesThisPeriod.

Often, no records meet the criteria in the Balance Forward supreport, so it
comes up empty, and displays nothing. There are ChargesThisPeriod amounts
to display, and they do... but with an empty space above, due to the empty
sub.

Customer ID is the field that links both subreports to the main form.
Fields in sub rptBalanceForward...

AsOfDate (unbound Calc - User entered BillingDate-1 month)
Transaction (label - "BalanceForward")
Amount (bound calc - =Sum(Amount) - Format nulls as .00)
CustomerID (bound - [CustomerID] - key/link field)

Tried "OnNoData", On Print, IIF(IsNull...), etc... to force a display, but
no luck.

Can someone offer some tips or tricks on how to force a rptBalanceForward
record to display as (ex.)
7/14/05 Balance Forward 0.00
if no records meet the criteria?


You can not make an empty subreport display anything. What
you can do is place one or more text box's on top of the
subreport And make them visible when the subreport doesn't
have any data:

Me.atextbox.Visible = Not Me.subreport.HasData

To get rid of the blank space, set the subreport control's
and its section's CanShrink property to Yes.
 
L

Linda Burnside

How about making an image out of the blank subreport? You could make the
image display when there are no records.

Linda

Marshall Barton said:
Al said:
I have a report with 2 subreports... it's a basic billing system.
rptBalanceForward - displays a balance due as of one month before the
"user
entered" current Billing Date
rptChargesThisPeriod - displays charge and credit transactions for the
last
month before Billing Date

rptBalanceForward is located just above rptChargesThisPeriod.

Often, no records meet the criteria in the Balance Forward supreport, so
it
comes up empty, and displays nothing. There are ChargesThisPeriod amounts
to display, and they do... but with an empty space above, due to the empty
sub.

Customer ID is the field that links both subreports to the main form.
Fields in sub rptBalanceForward...

AsOfDate (unbound Calc - User entered BillingDate-1 month)
Transaction (label - "BalanceForward")
Amount (bound calc - =Sum(Amount) - Format nulls as .00)
CustomerID (bound - [CustomerID] - key/link field)

Tried "OnNoData", On Print, IIF(IsNull...), etc... to force a display, but
no luck.

Can someone offer some tips or tricks on how to force a rptBalanceForward
record to display as (ex.)
7/14/05 Balance Forward 0.00
if no records meet the criteria?


You can not make an empty subreport display anything. What
you can do is place one or more text box's on top of the
subreport And make them visible when the subreport doesn't
have any data:

Me.atextbox.Visible = Not Me.subreport.HasData

To get rid of the blank space, set the subreport control's
and its section's CanShrink property to Yes.
 
A

Al Camp

Marshall Barton said:
Al said:
I have a report with 2 subreports... it's a basic billing system.
rptBalanceForward - displays a balance due as of one month before the
"user
entered" current Billing Date
rptChargesThisPeriod - displays charge and credit transactions for the
last
month before Billing Date

rptBalanceForward is located just above rptChargesThisPeriod.

Often, no records meet the criteria in the Balance Forward supreport, so
it
comes up empty, and displays nothing. There are ChargesThisPeriod amounts
to display, and they do... but with an empty space above, due to the empty
sub.

Customer ID is the field that links both subreports to the main form.
Fields in sub rptBalanceForward...

AsOfDate (unbound Calc - User entered BillingDate-1 month)
Transaction (label - "BalanceForward")
Amount (bound calc - =Sum(Amount) - Format nulls as .00)
CustomerID (bound - [CustomerID] - key/link field)

Tried "OnNoData", On Print, IIF(IsNull...), etc... to force a display, but
no luck.

Can someone offer some tips or tricks on how to force a rptBalanceForward
record to display as (ex.)
7/14/05 Balance Forward 0.00
if no records meet the criteria?


You can not make an empty subreport display anything. What
you can do is place one or more text box's on top of the
subreport And make them visible when the subreport doesn't
have any data:

Me.atextbox.Visible = Not Me.subreport.HasData

To get rid of the blank space, set the subreport control's
and its section's CanShrink property to Yes.

Thanks very much Marshall. That's just what I needed to know.
Sounds like a reasonable workaround.
 
A

Al Camp

I rarely use images, so I'll probably just use one text control...but the
invisible/visible soultion is just what I needed to know.
Thank you for your quick response,
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Linda Burnside said:
How about making an image out of the blank subreport? You could make the
image display when there are no records.

Linda

Marshall Barton said:
Al said:
I have a report with 2 subreports... it's a basic billing system.
rptBalanceForward - displays a balance due as of one month before the
"user
entered" current Billing Date
rptChargesThisPeriod - displays charge and credit transactions for the
last
month before Billing Date

rptBalanceForward is located just above rptChargesThisPeriod.

Often, no records meet the criteria in the Balance Forward supreport, so
it
comes up empty, and displays nothing. There are ChargesThisPeriod
amounts
to display, and they do... but with an empty space above, due to the
empty
sub.

Customer ID is the field that links both subreports to the main form.
Fields in sub rptBalanceForward...

AsOfDate (unbound Calc - User entered BillingDate-1 month)
Transaction (label - "BalanceForward")
Amount (bound calc - =Sum(Amount) - Format nulls as .00)
CustomerID (bound - [CustomerID] - key/link field)

Tried "OnNoData", On Print, IIF(IsNull...), etc... to force a display,
but
no luck.

Can someone offer some tips or tricks on how to force a rptBalanceForward
record to display as (ex.)
7/14/05 Balance Forward 0.00
if no records meet the criteria?


You can not make an empty subreport display anything. What
you can do is place one or more text box's on top of the
subreport And make them visible when the subreport doesn't
have any data:

Me.atextbox.Visible = Not Me.subreport.HasData

To get rid of the blank space, set the subreport control's
and its section's CanShrink property to Yes.
 

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