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. Printing a local report without preview

Printing a local report without preview

Scheduled Pinned Locked Moved Visual Basic
question
5 Posts 3 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.
  • S Offline
    S Offline
    Swiss Mantoro
    wrote on last edited by
    #1

    Hi Guys I need a favor again to somebody who had experience with printing report procedure, I have a simple program with a crystal report as the report generate,however when I want to printing out the report I have to running a program which connected to crystal report and click the printer icon on that crystal report preview to printing out my report. Could you please to tell me the way to printing out my report directly without preview it ?, if you can please tell me the command and show me the complete procedure that I have to follow. If this command not need a crystal report as the report generate please tell me what kind a program should I use for the main report generator. Many thank for you Best regards ;) ICE

    K M 2 Replies Last reply
    0
    • S Swiss Mantoro

      Hi Guys I need a favor again to somebody who had experience with printing report procedure, I have a simple program with a crystal report as the report generate,however when I want to printing out the report I have to running a program which connected to crystal report and click the printer icon on that crystal report preview to printing out my report. Could you please to tell me the way to printing out my report directly without preview it ?, if you can please tell me the command and show me the complete procedure that I have to follow. If this command not need a crystal report as the report generate please tell me what kind a program should I use for the main report generator. Many thank for you Best regards ;) ICE

      K Offline
      K Offline
      Kschuler
      wrote on last edited by
      #2

      I haven't done it before, but I will in the near future so I've been looking around for similar information. I think to print without using the print preview all you need to do is set the PrinterOption properties of your crystal reports ReportDocument object. Then call the PrintToPrinter method of the ReportDocument object. (This is what I've gotten from Visual Studio 2005) I know this doesn't answer all of your questions, but maybe it can help get you started.

      S 1 Reply Last reply
      0
      • K Kschuler

        I haven't done it before, but I will in the near future so I've been looking around for similar information. I think to print without using the print preview all you need to do is set the PrinterOption properties of your crystal reports ReportDocument object. Then call the PrintToPrinter method of the ReportDocument object. (This is what I've gotten from Visual Studio 2005) I know this doesn't answer all of your questions, but maybe it can help get you started.

        S Offline
        S Offline
        Swiss Mantoro
        wrote on last edited by
        #3

        Hi Mr.Kschuler Thank you very much for your reply, well I think I can consider to use your way, but if you don't mind please send me your sample program command for this matter. Thank's ICE

        K 1 Reply Last reply
        0
        • S Swiss Mantoro

          Hi Mr.Kschuler Thank you very much for your reply, well I think I can consider to use your way, but if you don't mind please send me your sample program command for this matter. Thank's ICE

          K Offline
          K Offline
          Kschuler
          wrote on last edited by
          #4

          This bit of code seemed to work for me. (I use a PrintDialog control to allow the user to select which printer they want. And again, I am assuming you use Visual Studio 2005.)

          Select Case PrintDialog1.ShowDialog
          Case Windows.Forms.DialogResult.OK
          ProductionWorksheet1.PrintOptions.PrinterName = PrintDialog1.PrinterSettings.PrinterName
          ProductionWorksheet1.PrintToPrinter(1, False, 1, 1)
          End Select

          -- modified at 9:05 Thursday 8th June, 2006 ProductionWorksheet1 is the name of my ReportDocument object which is found in the toolbox under the Crystal Reports section.

          1 Reply Last reply
          0
          • S Swiss Mantoro

            Hi Guys I need a favor again to somebody who had experience with printing report procedure, I have a simple program with a crystal report as the report generate,however when I want to printing out the report I have to running a program which connected to crystal report and click the printer icon on that crystal report preview to printing out my report. Could you please to tell me the way to printing out my report directly without preview it ?, if you can please tell me the command and show me the complete procedure that I have to follow. If this command not need a crystal report as the report generate please tell me what kind a program should I use for the main report generator. Many thank for you Best regards ;) ICE

            M Offline
            M Offline
            Muhammad Jawad
            wrote on last edited by
            #5

            Hi you can use the printOut command of the report. i.e. on the click event of the print button.... CrystalReport1.printOut false the parameter false is used to diable user prompt. the other parameters are self explaining. (Note: I am using crsytal reports 9 and VB.6) Bye:zzz:

            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