Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / January 2006

Tip: Looking for answers? Try searching our database.

Hiding Non-Value SubReport

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AccessHelp - 17 Jan 2006 20:01 GMT
I have a report which contains a subreport.  The report is grouped by Student
ID, and I have the subreport in the Student ID header section.  Sometimes,
there are no activities for that student.  In that situation, the subreport
section is blank but the header of the subreport is showing.  

What I like to do is , I don't like to show blank (reclaim the space) and
the header of the subreport.  Is it possible?  

Thanks.
Ofer - 17 Jan 2006 20:18 GMT
In the OnFormat event of the section where the sub report is located, you can
add the code to check if the sub report has data, and if it doesn't make it
not visible

If Me.[SubReportName].Report.HasData = True Then
   Me.[SubReportName].Visible = True
Else
    Me.[SubReportName].Visible = False
End If

Signature

\\// Live Long and Prosper \\//
BS"D

> I have a report which contains a subreport.  The report is grouped by Student
> ID, and I have the subreport in the Student ID header section.  Sometimes,
[quoted text clipped - 5 lines]
>
> Thanks.
AccessHelp - 17 Jan 2006 21:19 GMT
Hi Ofer,

Thanks for your help.  It works as far as the subreport header and the
subreport are invisible, but the subreport section is now a blank.  Is there
a way to shrink the area (instead of showing blank) in addition to being
invisible?

For example, I have the Student ID and the subreport in the Student ID
Header section.  Then in the Detail section, I have other transactions for
that Student ID.  What happen is, when I don't have the info in the
subreport, the subreport is invisible, but there is a blank area (about an
inch) between the Student ID and the details.

Thanks.

> In the OnFormat event of the section where the sub report is located, you can
> add the code to check if the sub report has data, and if it doesn't make it
[quoted text clipped - 15 lines]
> >
> > Thanks.
Ofer - 17 Jan 2006 21:56 GMT
Try and set the can shrink property of the Sub report and the section where
the sub reported located in to Yes

Signature

\\// Live Long and Prosper \\//
BS"D

> Hi Ofer,
>
[quoted text clipped - 30 lines]
> > >
> > > Thanks.
AccessHelp - 17 Jan 2006 22:40 GMT
I just tried the Shrink property, and it didn't work.  It still shows a blank.

Can I ask you one more question?  I have a report which groups by Student
Group.  In the Student Group header, I have a subreport in addition to the
Student Group name.  I connect the main report and the subreport with Student
Group and Student ID (Masters and Childs).  On the main report, I have a
parameter set, so that I can get the data either by Student Group or Student
ID.  When I just type in a Student Group in the parameter, the detail section
in the main report would show everything, but the subreport doesn't not show
anything.  When I just type in a Student ID in the parameter, both the main
report and the subreport show the data.  

If I just join the reports by Student Group and when I type in a Student
Group, both the main report and the subreport would show everything.  On the
other hand, when I type in a Student ID, the main report just show the data
for that Student ID and the subreport would show all the data of all the
student ID for that student group.

What do I need to do to show just the data for that Student ID in both
sections when I type in a Student ID, and the data for that Student Group in
both sections when I type in a Student Group?

Thanks.

> Try and set the can shrink property of the Sub report and the section where
> the sub reported located in to Yes
[quoted text clipped - 33 lines]
> > > >
> > > > Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.