[AccessD] How to Suppress Main Report Line if the Related Sub-Report has no Data

Brad Marks BradM at blackforestltd.com
Tue Dec 17 05:32:02 CST 2013


Paul,

Yes,  I would like to not show specific main report lines when the related sub-report has no lines.

I thought that this would be easy to do, but I have not be able to figure this out after many attempts.

Thanks,
Brad  

PS.  Here is the rest of the story...  We have an existing Access report that works nicely.  Recently our users asked for a variation of this report.  This variation involved the addition of a "Where" condition on the sub-report's underlying query.  This works nicely, except that now there are many lines on the Main report that do not have any sub-report lines.  The users would like to not see these extra Main report lines.  




-----Original Message-----
From: accessd-bounces at databaseadvisors.com on behalf of Paul Hartland
Sent: Mon 12/16/2013 10:18 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] How to Suppress Main Report Line if the Related Sub-Report has no Data
 
Brad,

Am I clear on this that you don't want to show the main detail/report if
there is no sub detail/report data ?

Paul


On 17 December 2013 01:37, Brad Marks <BradM at blackforestltd.com> wrote:

> Rocky,
>
> Thanks for the help.
>
> Unfortunately, I seem to be having "senior moments" and I cannot even get
> a small test example to work.
>
> Perhaps you could post more details.
>
> For example, I am not sure how to obtain the record count of the
> sub-report.
>
> Thanks,
> Brad
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com on behalf of Rocky Smolin
> Sent: Thu 12/5/2013 10:26 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Need to Suppress Main Report Line if
> therelatedSub-Report has no Data
>
> I would use the format event of the detail section to get the record count
> of the sub report and, if it's zero then
>
> Me.MoveLayout = False
> Me.NextRecord = True
> Me.PrintSection = False
>
> HTH
>
> Rocky
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
> Sent: Thursday, December 05, 2013 5:17 PM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] Need to Suppress Main Report Line if the
> relatedSub-Report has no Data
>
> All,
>
> I have a report that has one sub-report.  This sub-report is tied to a
> field
> in the detail lines of the main report.
>
> Recently, our users requested that if there is no data in the sub-report
> they would like to see the related line on the main report suppressed.
>
> I have never tried to do this before.  I have set up a little test Access
> application and tried a few ideas, but have not found a good solution.
>
> Is there a way to accomplish this with Access 2007?
>
> Thanks,
> Brad
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> This message was scanned by ESVA and is believed to be clean.
> Click here to report this message as spam.
> http://h0stname/cgi-bin/learn-msg.cgi?id=6A8F528AEB.B87B1
>
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>


-- 
Paul Hartland
paul.hartland at googlemail.com
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
This message was scanned by ESVA and is believed to be clean.
Click here to report this message as spam. 
http://h0stname/cgi-bin/learn-msg.cgi?id=5AF38285E3.8409B





More information about the AccessD mailing list