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. C#
  4. Printing [modified]

Printing [modified]

Scheduled Pinned Locked Moved C#
salescsharpcsshelptutorial
3 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.
  • R Offline
    R Offline
    rowdykuttan
    wrote on last edited by
    #1

    Hi All Am developing an inventory package in C# 2005. in this customer needs printout of sales in preprinted stationary. right now am following it this way. On Clicking the grid and print button is selected am writing it to a TEXT file named SALESPRINT.TXT. AM HAVING PROBLEM FROM THIS PART, AM ABLE TO WRITE TO A TEXT FILE BUT THERE IS ALIGNMENT PROBLEMS. following is the format of the preprinted stationary. INV DATE xxxxxxxxxx INV NO xxxxxxxxxxxx PAGE NO xxxxx CUSOTMER ADDRESS1 xxxxxxxxxxxxxxxxx CUSOTMER ADDRESS2 xxxxxxxxxxxxxxxxx SL NO SHORT CODE ITEM NAME QTY RATE TOTAL xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 _______________________________________________________________________________ TOTAL xxxxx _______________________________________________________________________________ DISCOUNT xxxxx _______________________________________________________________________________ GT xxxxx so right now am using string.PadRight & string.PadLeft to specify the positions of contents in the text file. but am finding it difficult to do it. customer is using Dot matrix printer & preprinted continuous sheets for printing this. So to do this am i doing the right thing and am i on right track ???? Please guide to finish this, if anyone knows how t

    I 1 Reply Last reply
    0
    • R rowdykuttan

      Hi All Am developing an inventory package in C# 2005. in this customer needs printout of sales in preprinted stationary. right now am following it this way. On Clicking the grid and print button is selected am writing it to a TEXT file named SALESPRINT.TXT. AM HAVING PROBLEM FROM THIS PART, AM ABLE TO WRITE TO A TEXT FILE BUT THERE IS ALIGNMENT PROBLEMS. following is the format of the preprinted stationary. INV DATE xxxxxxxxxx INV NO xxxxxxxxxxxx PAGE NO xxxxx CUSOTMER ADDRESS1 xxxxxxxxxxxxxxxxx CUSOTMER ADDRESS2 xxxxxxxxxxxxxxxxx SL NO SHORT CODE ITEM NAME QTY RATE TOTAL xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 xx xxxxxx xxxxxxxxxxxxxxxxxxx 10 12.25 122.5 _______________________________________________________________________________ TOTAL xxxxx _______________________________________________________________________________ DISCOUNT xxxxx _______________________________________________________________________________ GT xxxxx so right now am using string.PadRight & string.PadLeft to specify the positions of contents in the text file. but am finding it difficult to do it. customer is using Dot matrix printer & preprinted continuous sheets for printing this. So to do this am i doing the right thing and am i on right track ???? Please guide to finish this, if anyone knows how t

      I Offline
      I Offline
      il_masacratore
      wrote on last edited by
      #2

      Have you thinked to use crystal reports? Or create an HTML file instead of an txt? If is only to print purpose you can build an html

      Visit my blog at http://dotnetforeveryone.blogspot.com/

      R 1 Reply Last reply
      0
      • I il_masacratore

        Have you thinked to use crystal reports? Or create an HTML file instead of an txt? If is only to print purpose you can build an html

        Visit my blog at http://dotnetforeveryone.blogspot.com/

        R Offline
        R Offline
        rowdykuttan
        wrote on last edited by
        #3

        But its making the print slow, right now am using this way. PrintTextWrite.WriteLine(PSLNO.PadRight(3) + " " + PKCODE.PadRight(14) + " " + PITEMNAME.PadRight(45) + " " + PQTY.PadLeft(40) + " " + PRT.PadRight(11) + " " + PTOT1.PadLeft(20)); but when size of PITEMNAME increases PQTY,PRATE,PTOT1 will go off the paper

        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