Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2010
    Posts
    186

    Unanswered: 2 distinct reports combined together

    I am looking for some help to join two reports together which will print on 2 separate pages, each report fill a page

    These reports relate to the same invoice.
    I need a way to join together in one pdf - page 1, the invoice credit rptCMEIR and page 2, the corrected invoice rptCIEIR.

    The reports have code in them to set the page footer to a certain height so it will be one page if there is one record or seven records and draws lines to fill the detail section..both exact same, like this
    Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

    Me.ScaleMode = 1
    Me.ForeColor = 0
    Me.DrawStyle = vbSolid
    Me.DrawWidth = 5

    Me.Line (1.5417 * 1440, 6000)-(1.5417 * 1440, 10080), vbRed
    Me.Line (4.6667 * 1440, 6000)-(4.6667 * 1440, 10080), vbRed
    Me.Line (6.625 * 1440, 6000)-(6.625 * 1440, 10080), vbRed
    Me.Line (8.25 * 1440, 6000)-(8.25 * 1440, 10080), vbRed

    Me.DrawWidth = 1
    End Sub



    Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
    Call SetGrpFtrLoc(Me.Report, 6.75)


    Me!Label90.Visible = Not IsNull(Me!ADJTAX)
    Me!Label92.Visible = Not IsNull(Me!ADJFRT)

    End Sub
    Private Sub Report_Open(Cancel As Integer)
    DoCmd.Maximize
    End Sub
    Private Sub Report_Close()
    DoCmd.Restore
    End Sub



    Private Sub Report_Page()


    Me.ScaleMode = 1
    Me.ForeColor = 0
    Me.DrawStyle = vbSolid
    Me.DrawWidth = 5

    Me.Line (1.5417 * 1440, 6000)-(1.5417 * 1440, 10080), vbRed
    Me.Line (4.6667 * 1440, 6000)-(4.6667 * 1440, 10080), vbRed
    Me.Line (6.625 * 1440, 6000)-(6.625 * 1440, 10080), vbRed
    Me.Line (8.25 * 1440, 6000)-(8.25 * 1440, 10080), vbRed

    Me.DrawWidth = 1
    End Sub


    rptCMEIR is the main report, I linked rptCIEIR as a subreport on INVNO but it won't show.....the most I've seen is a piece of the header text stuck on the bottom of page1.

    How can I change the main report code so that it will allow a 2nd page?

    Should the page footer lock for the 2nd page now be 13.50? And change all of the line heights for the 2nd page?

    Thank you in advance for your help!

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Consider using sub report linked using the invoice number.
    You may need a blank top level with two embedded sub reports
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jun 2010
    Posts
    186
    I never thought of that.......but the problem is I'll loose alot of my coding.
    First off, both my reports have page headers and footers...page header I know how to handle but I need the page footer to calculate the bottom of my lines and setfooterlock....
    How do I get Page footer in a subreport? As far as I know subreports page headers and footers aren't active......
    so I have this module - Sub SetGrpFtrLoc(rpt As Report, GrpFtrLoc As Double)
    GrpFtrLoc = GrpFtrLoc * 1440 'Convert from inches to twips.
    If rpt.Top < GrpFtrLoc Then 'Not at location yet, so
    rpt.MoveLayout = True 'move to next print location.
    rpt.NextRecord = False 'Do not go to next record.
    rpt.PrintSection = False 'Do not print the section.
    End If 'Until the required offset is reached

    End Sub

    then in the reports -
    Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
    Call SetGrpFtrLoc(Me.Report, 6.75)


    Me!Label90.Visible = Not IsNull(Me!ADJTAX)
    Me!Label92.Visible = Not IsNull(Me!ADJFRT)

    End Sub

    How will do I tell access to set these pages how I need them now that they are subreports?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •