Adding additional lines / empty records on a report

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rico

    #1

    Adding additional lines / empty records on a report

    Hello,

    I'm formatting a report based on an existing controlled document. The
    document that I'm duplicating has a number of lines that the user fills our
    manually, but the database version of this document will fill the fields
    with data rather than the user hand writing entries. The problem I'm
    running into is when the last record prints, there are no more additional
    lines (i.e. if the document has 15 lines to be filled out, and if I print
    from Access with only 10 records entered, 10 lines is all I get.).

    I'd like to complete the additional lines using empty records (5 records per
    the previous example) in order to print the report exactly as the original
    document appears. I can create a work around by using a table with 15 empty
    fields and rig it up to use any extra space to add the lines per page, but
    isn't there an easier way? I was hoping there would be some way to fool the
    formatting of each section into thinking there is still a record that needs
    formatting until it reaches the end, but I have no idea how to do that if it
    can be done.

    Any help would be much appreciated.

    Thanks!


  • salad

    #2
    Re: Adding additional lines / empty records on a report

    Rico wrote:[color=blue]
    > Hello,
    >
    > I'm formatting a report based on an existing controlled document. The
    > document that I'm duplicating has a number of lines that the user fills our
    > manually, but the database version of this document will fill the fields
    > with data rather than the user hand writing entries. The problem I'm
    > running into is when the last record prints, there are no more additional
    > lines (i.e. if the document has 15 lines to be filled out, and if I print
    > from Access with only 10 records entered, 10 lines is all I get.).
    >
    > I'd like to complete the additional lines using empty records (5 records per
    > the previous example) in order to print the report exactly as the original
    > document appears. I can create a work around by using a table with 15 empty
    > fields and rig it up to use any extra space to add the lines per page, but
    > isn't there an easier way? I was hoping there would be some way to fool the
    > formatting of each section into thinking there is still a record that needs
    > formatting until it reaches the end, but I have no idea how to do that if it
    > can be done.
    >
    > Any help would be much appreciated.
    >
    > Thanks!
    >[/color]

    The properties that will assist you are MoveLayout, NextRecord,
    PrintSection. Here's an example

    Private Sub GroupHeader0_Fo rmat(Cancel As Integer, FormatCount As Integer)
    If Me.MoveCount < intLineCnt Then
    Me.MoveLayout = True
    Me.PrintSection = False
    Me.NextRecord = False
    Me.MoveCount = Me.MoveCount + 1
    Else
    Me.MoveLayout = True
    Me.PrintSection = True
    Me.NextRecord = True
    End If
    End Sub

    Private Sub PageHeader_Form at(Cancel As Integer, FormatCount As Integer)
    Me.MoveCount = 0
    intLineCnt = CalcLinesToMove ()
    End Sub

    In the above example I wanted to moved down so many lines until
    MoveCount was equal to intLineCnt. I created a field called MoveCount
    with no control source and MoveCount was reset on each page.

    You'll have to play with those properties to get it to do what you want.

    Comment

    • Rico

      #3
      Re: Adding additional lines / empty records on a report

      Thanks Salad, that's excellent. Works like a charm.


      "salad" <oil@vinegar.co m> wrote in message
      news:7Ay8g.1201 $Jf.122@newsrea d4.news.pas.ear thlink.net...[color=blue]
      > Rico wrote:[color=green]
      >> Hello,
      >>
      >> I'm formatting a report based on an existing controlled document. The
      >> document that I'm duplicating has a number of lines that the user fills
      >> our manually, but the database version of this document will fill the
      >> fields with data rather than the user hand writing entries. The problem
      >> I'm running into is when the last record prints, there are no more
      >> additional lines (i.e. if the document has 15 lines to be filled out, and
      >> if I print from Access with only 10 records entered, 10 lines is all I
      >> get.).
      >>
      >> I'd like to complete the additional lines using empty records (5 records
      >> per the previous example) in order to print the report exactly as the
      >> original document appears. I can create a work around by using a table
      >> with 15 empty fields and rig it up to use any extra space to add the
      >> lines per page, but isn't there an easier way? I was hoping there would
      >> be some way to fool the formatting of each section into thinking there is
      >> still a record that needs formatting until it reaches the end, but I have
      >> no idea how to do that if it can be done.
      >>
      >> Any help would be much appreciated.
      >>
      >> Thanks![/color]
      >
      > The properties that will assist you are MoveLayout, NextRecord,
      > PrintSection. Here's an example
      >
      > Private Sub GroupHeader0_Fo rmat(Cancel As Integer, FormatCount As Integer)
      > If Me.MoveCount < intLineCnt Then
      > Me.MoveLayout = True
      > Me.PrintSection = False
      > Me.NextRecord = False
      > Me.MoveCount = Me.MoveCount + 1
      > Else
      > Me.MoveLayout = True
      > Me.PrintSection = True
      > Me.NextRecord = True
      > End If
      > End Sub
      >
      > Private Sub PageHeader_Form at(Cancel As Integer, FormatCount As Integer)
      > Me.MoveCount = 0
      > intLineCnt = CalcLinesToMove ()
      > End Sub
      >
      > In the above example I wanted to moved down so many lines until MoveCount
      > was equal to intLineCnt. I created a field called MoveCount with no
      > control source and MoveCount was reset on each page.
      >
      > You'll have to play with those properties to get it to do what you want.[/color]


      Comment

      Working...