A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How can I make a group not to show/display in a report if no data is under that group?



 
 
Thread Tools Display Modes
  #1  
Old July 28th, 2006, 05:10 PM posted to microsoft.public.access.reports
erick-flores
external usenet poster
 
Posts: 85
Default How can I make a group not to show/display in a report if no data is under that group?

Hello,

I have this big report that summary a lot of data. Sometimes a group
need to be shown if that group has data on it otherwire I dont want to
show the group in the report. So, is there an option to not show the
group if no data is under a group?

Any ideas?

Thank You

  #2  
Old July 28th, 2006, 06:29 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default How can I make a group not to show/display in a report if no data is under that group?

erick-flores wrote:
I have this big report that summary a lot of data. Sometimes a group
need to be shown if that group has data on it otherwire I dont want to
show the group in the report. So, is there an option to not show the
group if no data is under a group?



Add a text box with the expression =Coount(*) to the group
header section. Then use each section's Format event to
check the text box and cancel the section:

Cancel = (thetextbox = 0)

--
Marsh
MVP [MS Access]
  #3  
Old July 28th, 2006, 06:41 PM posted to microsoft.public.access.reports
erick-flores
external usenet poster
 
Posts: 85
Default How can I make a group not to show/display in a report if no data is under that group?


Marshall Barton wrote:
erick-flores wrote:
I have this big report that summary a lot of data. Sometimes a group
need to be shown if that group has data on it otherwire I dont want to
show the group in the report. So, is there an option to not show the
group if no data is under a group?



Add a text box with the expression =Coount(*) to the group
header section. Then use each section's Format event to
check the text box and cancel the section:

Cancel = (thetextbox = 0)

--
Marsh
MVP [MS Access]


Because I am grouping by different IDs I cant add another
field/expression to my grouping, can I?
I read you reply this to anoher person, and I already check for this
option

Any others suggestions?

  #4  
Old July 28th, 2006, 07:31 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default How can I make a group not to show/display in a report if no data is under that group?

erick-flores wrote:


Marshall Barton wrote:
erick-flores wrote:
I have this big report that summary a lot of data. Sometimes a group
need to be shown if that group has data on it otherwire I dont want to
show the group in the report. So, is there an option to not show the
group if no data is under a group?



Add a text box with the expression =Count(*) to the group
header section. Then use each section's Format event to
check the text box and cancel the section:

Cancel = (thetextbox = 0)


Because I am grouping by different IDs I cant add another
field/expression to my grouping, can I?
I read you reply this to anoher person, and I already check for this
option

Any others suggestions?



If it's not a report group, then I think you need to explain
what you mean by "group".

Another thought, how can there be data for the report when a
"group" has no data?

--
Marsh
MVP [MS Access]
  #5  
Old July 28th, 2006, 08:05 PM posted to microsoft.public.access.reports
erick-flores
external usenet poster
 
Posts: 85
Default How can I make a group not to show/display in a report if no data is under that group?

Ok, let me explain you. Compressors, Stages, Cylinders, Comp. Valve,
Comp. Parts, Gaskets, Piston, Comp. Rod, Nuts and Piston Rings

Compressor has Stage(s) (always)
Stage(s) has Cylinder(s) (always)
Cylinder can have Comp. Valve, Gaskets or Piston
Comp. Valve can have Comp. Parts
Cylinder can has Gasket
Piston can have Comp. Rod or Nuts
Nuts can have Piston Rings

So this si kind of the idea. I want to see my report first. group by:
1. Compressor (cmp_id)
2. Stages (stg_id)
3. Cylinders (cyl_id)
4. and then all the other components from the cylinders.

What I am doing:
1st group cmp_id
2nd group stg_id
3rd group cyl_id
4th group Comp Valve
5th group Comp. Parts
..
..
..
So I was thinking if a Cylinder only has a Gasket then only display the
gasket group.

I think there should be a better way of doing this, but I dont know

  #6  
Old July 28th, 2006, 08:27 PM posted to microsoft.public.access.reports
erick-flores
external usenet poster
 
Posts: 85
Default How can I make a group not to show/display in a report if no data is under that group?


Also when there is no data under a group, the others groups will not
work. So the hold report will display no data. It will only show the
group headers. How can I fix this? any ideas?

  #7  
Old July 28th, 2006, 08:29 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default How can I make a group not to show/display in a report if no data is under that group?

erick-flores wrote:

Ok, let me explain you. Compressors, Stages, Cylinders, Comp. Valve,
Comp. Parts, Gaskets, Piston, Comp. Rod, Nuts and Piston Rings

Compressor has Stage(s) (always)
Stage(s) has Cylinder(s) (always)
Cylinder can have Comp. Valve, Gaskets or Piston
Comp. Valve can have Comp. Parts
Cylinder can has Gasket
Piston can have Comp. Rod or Nuts
Nuts can have Piston Rings

So this si kind of the idea. I want to see my report first. group by:
1. Compressor (cmp_id)
2. Stages (stg_id)
3. Cylinders (cyl_id)
4. and then all the other components from the cylinders.

What I am doing:
1st group cmp_id
2nd group stg_id
3rd group cyl_id
4th group Comp Valve
5th group Comp. Parts
.
.
.
So I was thinking if a Cylinder only has a Gasket then only display the
gasket group.

I think there should be a better way of doing this, but I dont know



That seems like a good way to do it.

As far as I can tell from your description, I still think
you can use a text box named txtValveCount in the Valve
group's header section with the expression =Count(*)
Then the section can be suppressed by adding a line of code
to its Format event:
Cancel = (Me.txtValveCount = 0)
Repeat the same kind of thing in each group header.

If I am still misunderstanding what you are saying, please
post a Copy/Paste of the report's record source query along
with some explanation of how the fields are used in the
report.

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.