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  

Excluding parent report data/tuple if subreport has no data.



 
 
Thread Tools Display Modes
  #1  
Old March 11th, 2007, 02:17 PM posted to microsoft.public.access.reports
Daz[_2_]
external usenet poster
 
Posts: 2
Default Excluding parent report data/tuple if subreport has no data.

Hi, I have a question that bears a resemblance to this previous thread

http://groups.google.com.au/group/mi...97047fa63029ec

My scenario is this:

I have a report which lists a series of items in catergories, each of
these items can have several subreports which are bound to some strict
data constraints (date filters, $ value filters - also the subreports
data sources are not all the same). For instance, the setup is like
this

Category 1
---- Subreport 1
-----Subreport 2
-----Subreport 3
-----Subreport 4
Category 3
---- Subreport 1
-----Subreport 2
-----Subreport 3
-----Subreport 4

... and so on throughout numerous categories.

What I want to do is hide, or make the category disappear from the
resultant report, if there is no data in the ANY of the subreports
under that category. ie. if the category has no useful subreport data
then we want to ignore it.

Been racking my brains for a few hours on how to do this in a simple
way. Any suggestions?

Regards
Darragh

  #2  
Old March 11th, 2007, 06:04 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Excluding parent report data/tuple if subreport has no data.

Subreports are almost always linked by child/master properties. You should be
able to create totals queries similar to your subreport record sources that
Group By the linking field and count the number of returned records that
might show in your subreport. Add these totals queries to the record source
of your main report. This will allow your main report to understand the
number of records (or lack of) that would display in your subreports. Use
this to filter your main report.
--
Duane Hookom
Microsoft Access MVP


"Daz" wrote:

Hi, I have a question that bears a resemblance to this previous thread

http://groups.google.com.au/group/mi...97047fa63029ec

My scenario is this:

I have a report which lists a series of items in catergories, each of
these items can have several subreports which are bound to some strict
data constraints (date filters, $ value filters - also the subreports
data sources are not all the same). For instance, the setup is like
this

Category 1
---- Subreport 1
-----Subreport 2
-----Subreport 3
-----Subreport 4
Category 3
---- Subreport 1
-----Subreport 2
-----Subreport 3
-----Subreport 4

... and so on throughout numerous categories.

What I want to do is hide, or make the category disappear from the
resultant report, if there is no data in the ANY of the subreports
under that category. ie. if the category has no useful subreport data
then we want to ignore it.

Been racking my brains for a few hours on how to do this in a simple
way. Any suggestions?

Regards
Darragh


  #3  
Old March 13th, 2007, 04:55 AM posted to microsoft.public.access.reports
Daz[_2_]
external usenet poster
 
Posts: 2
Default Excluding parent report data/tuple if subreport has no data.

Duane

Thanks for your response.

I utilised a variation of what you suggest. For those interested I did
the following.

Created count queries for the recordsources of the subreport.

Gathered the number of instances a parent property occured in the
count of the subreport recordsource. If count greater than 0, then
include that parent property constraint in the parent reports
recordsource.

A poor explanation I know, I will endevour to write up a better one
and post to the access section of my personal blog - http://www.darraghmurray.com

Regards
Darragh

On Mar 12, 4:04 am, Duane Hookom
wrote:
Subreports are almost always linked by child/master properties. You should be
able to create totals queries similar to your subreport record sources that
Group By the linking field and count the number of returned records that
might show in your subreport. Add these totals queries to the record source
of your main report. This will allow your main report to understand the
number of records (or lack of) that would display in your subreports. Use
this to filter your main report.
--
Duane Hookom
Microsoft Access MVP

"Daz" wrote:
Hi, I have a question that bears a resemblance to this previous thread


http://groups.google.com.au/group/mi...ss.reports/bro...


My scenario is this:


I have a report which lists a series of items in catergories, each of
these items can have several subreports which are bound to some strict
data constraints (date filters, $ value filters - also the subreports
data sources are not all the same). For instance, the setup is like
this


Category 1
---- Subreport 1
-----Subreport 2
-----Subreport 3
-----Subreport 4
Category 3
---- Subreport 1
-----Subreport 2
-----Subreport 3
-----Subreport 4


... and so on throughout numerous categories.


What I want to do is hide, or make the category disappear from the
resultant report, if there is no data in the ANY of the subreports
under that category. ie. if the category has no useful subreport data
then we want to ignore it.


Been racking my brains for a few hours on how to do this in a simple
way. Any suggestions?


Regards
Darragh



 




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 02:08 PM.


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