Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Page Break for report

Page Break for report

Scheduled Pinned Locked Moved Visual Basic
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris Dykes
    wrote on last edited by
    #1

    Hi, I am using VB to grab information from Monarch Pro and output it into a printable format, I have been putting it into a txt file and need a way to input a page break into the output, I am able to use Word if that helps. I can also use other methods of parcing the data, I just need a little push in the right direction, it would be best to put the information into a format that a user could open,print and go.

    D 1 Reply Last reply
    0
    • C Chris Dykes

      Hi, I am using VB to grab information from Monarch Pro and output it into a printable format, I have been putting it into a txt file and need a way to input a page break into the output, I am able to use Word if that helps. I can also use other methods of parcing the data, I just need a little push in the right direction, it would be best to put the information into a format that a user could open,print and go.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Chris Dykes wrote:

      I have been putting it into a txt file and need a way to input a page break into the output,

      There is no such thing as a pagebreak in a text file. The closest you're going to get is the FormFeed character (ASCII code 12). Of course, there are other formats you could use besides straight text. But, keep in mind that pagebreaks are a function of the application doing the printing, not of the document. The document needs to convey that there should be a pagebreak at a certain point in the document and signal that by including the appropriate formatting codes in the file. Exactly how to do this depends on the file format chosen and the application printing it.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      C 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Chris Dykes wrote:

        I have been putting it into a txt file and need a way to input a page break into the output,

        There is no such thing as a pagebreak in a text file. The closest you're going to get is the FormFeed character (ASCII code 12). Of course, there are other formats you could use besides straight text. But, keep in mind that pagebreaks are a function of the application doing the printing, not of the document. The document needs to convey that there should be a pagebreak at a certain point in the document and signal that by including the appropriate formatting codes in the file. Exactly how to do this depends on the file format chosen and the application printing it.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        C Offline
        C Offline
        Chris Dykes
        wrote on last edited by
        #3

        So if I use Word to print the document I would format it to what Word requires for page breaks?

        D 1 Reply Last reply
        0
        • C Chris Dykes

          So if I use Word to print the document I would format it to what Word requires for page breaks?

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          You'd more than likely be using Word's object model to build the document, which will probably include a method to insert a pagebreak.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups