[AccessD] Page Break and SubReport

Susan Geller sgeller at cce.umn.edu
Thu Nov 20 10:56:35 CST 2003


Charlotte,

I tried these two things and neither works (see below).  When I put it
on_open of report, I get an error.  When I put it on_format of the
detail section where the subreport and the page break are both located I
don't get an error, but it doesn't work either.  In debugging, I do find
that the value for Me!sub_payhist.Report.HasData is 0 which means that
it is seeing that there is no data on the report.  Could it be that even
when the page break item is invisible, it still functions?

--Susan

#1:
Me!PageBreak_payhistory.Visible = Me!sub_payhist.Report.HasData 

#2:
If Me!sub_payhist.Report.HasData = 0 Then
    Me!PageBreak_payhistory.Visible = False
Else: Me!PageBreak_payhistory.Visible = True
End If

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte
Foust
Sent: Wednesday, November 19, 2003 5:46 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Page Break and SubReport


Put it in the main report and set the pagebreak to Visible =  the
subreport's HasData property.

Charlotte Foust

-----Original Message-----
From: Susan Geller [mailto:sgeller at cce.umn.edu] 
Sent: Wednesday, November 19, 2003 2:31 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Page Break and SubReport


I have a report that has a subreport.  In the subreport there sometimes
is data and sometimes not.  When there is data, I want a page break and
then the subreport.  When there is not data, I want no page break and no
subreport.  When I put the pagebreak in the main report, I get a page
break regardless of what's in the subreport.  When I put it in the
subreport, I still get a page break even when the subreport doesn't show
because there is no data.  I've tried a couple of code manipulations
that look to see if there is no data and if there isn't set the
subreport to invisible, but that doesn't work.  Suggestions?

--Susan


Susan B. Geller
Office of Information Systems
College of Continuing Education
University of Minnesota
306 Wesbrook Hall
77 Pleasant Street SE
Minneapolis, MN 55455
Phone:  612-626-4785
Fax:  612-625-2568


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list