[AccessD] Report Group Page Breaks with no break for theReportFooter

John Skolits askolits at ot.com
Tue Sep 19 05:54:48 CDT 2006


That seemed to work. Thanks!

The only change was that I created a local variable for the report module
called lng_rsCount  and loaded the Dcount Value into it, during the "OnOpen"
event of the report.

In that way the Dcount didn't run multiple times as it does in the format
event. It was making the report open up too slowly.

Thanks again.


John

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.TEJPAL
Sent: Monday, September 18, 2006 1:48 PM
To: Access Developers discussion and problem solving
Cc: ADT
Subject: Re: [AccessD] Report Group Page Breaks with no break for
theReportFooter

John,

    Apparently you wish to force page break after the group footer in such a
manner that normally, such break gets forced compulsorily, while at the end
of report, there should be no forced page break if adequate space is
available to accommodate the report footer as well.

    It is suggested that you should avoid setting any page break in report
design via properties dialog box of group footer. Instead, insert the sample
code given below, in format event of appropriate group footer. TxtCount is
the name of calculated text box in Detail section (with the expression =1).
Its running sum property should be set to Overall.

Best wishes,
A.D.Tejpal
---------------

================================
Private Sub GroupFooter1_Format(Cancel As Integer, _
                                            FormatCount As Integer)    
    If TxtCount < DCount("*", Me.RecordSource) Then
        ' Not yet yet reached the end of report. Force
        ' new page after group footer.
        Me.GroupFooter1.ForceNewPage = 2
    Else
        ' End of report has been reached. No need to
        ' force new page. Access will take care of
        ' placing the report footer either on current page
        ' or the next one, depending upon room available.
        Me.GroupFooter1.ForceNewPage = 0
    End If
End Sub
================================

  ----- Original Message ----- 
  From: John Skolits 
  To: 'Access Developers discussion and problem solving' 
  Sent: Friday, September 15, 2006 19:56
  Subject: [AccessD] Report Group Page Breaks with no break for the
ReportFooter

  I have a report with a group header/footer.
  I tell the group Footer to force a new page "After Section'
  No problem. Breaks after each group.

  There is also a 'Report footer'. That page gets printed last.
  But, if I have only one group and it fits on the first page with plenty of
  room for the report footer to fit, how can I prevent a page break?

  All the 'Keep together' properties of the Groups and Sections are True.
  All the 'Can Shrinks' are set to true.
  All the other 'Force New Page' properties are set to None

  I've tried modifying the footer-'Force New Page' property in code during
the format of the detail section, but that doesn't seem to work.

  Any ideas?

  Thanks,

  John
-- 
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