Display Group Header when there is no Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that groups by Categories. I need to be able to display the
Header and Footer information even if the Category is Null. I have tried
using the Event "on no data" but must be doing something wrong.
 
CRouse said:
I have a report that groups by Categories. I need to be able to display the
Header and Footer information even if the Category is Null. I have tried
using the Event "on no data" but must be doing something wrong.


The NoData event and the HasData property apply to the
entire report, not to a group.

The key to getting data that doesn't exist to display is to
provide some data ;-) This is done by using an outer join
in the report's record source query. You probably have an
INNER JOIN in there now, just change it to a LEFT JOIN or
RIGHT JOIN depending on where the category table is in the
join clause.
 
Excellent Idea! It works but now I have another problem..

I have sub-totals underneath each category, the category shows up and
records "1" record in the Total. Suggestions?
 
How are you calculating the subtotal?

If you have the subtotal text box in the category Group
Footer section, the normal way to calculate the total for
the group is to use an expression like =Sum(amount)
 
I'm using the following in the Group Footer Section:

="Total Number of '" & ([FIELDNAME]) & "' TEXT STRING = " & Count(*) & " " &
IIf(Count(*)=1,"detail record","detail records")

I don't want to show "1" detail record if in fact there is no Data but I
still need the Group Header to show up regardless. Thanks a Bunch for your
help!

Marshall Barton said:
How are you calculating the subtotal?

If you have the subtotal text box in the category Group
Footer section, the normal way to calculate the total for
the group is to use an expression like =Sum(amount)
--
Marsh
MVP [MS Access]


Excellent Idea! It works but now I have another problem..

I have sub-totals underneath each category, the category shows up and
records "1" record in the Total. Suggestions?
 
I still don't understand what you're trying to do.

Maybe using Count(keyfield) instead of Count(*) will do it?
Where: keyfield is the name of the primary key in the child
table.
--
Marsh
MVP [MS Access]

I'm using the following in the Group Footer Section:

="Total Number of '" & ([FIELDNAME]) & "' TEXT STRING = " & Count(*) & " " &
IIf(Count(*)=1,"detail record","detail records")

I don't want to show "1" detail record if in fact there is no Data but I
still need the Group Header to show up regardless. Thanks a Bunch for your
help!

Marshall Barton said:
How are you calculating the subtotal?

If you have the subtotal text box in the category Group
Footer section, the normal way to calculate the total for
the group is to use an expression like =Sum(amount)
 
Back
Top