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. Directly print data with out sending to Crystal Report

Directly print data with out sending to Crystal Report

Scheduled Pinned Locked Moved Visual Basic
databasetutorial
7 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.
  • N Offline
    N Offline
    Nine_
    wrote on last edited by
    #1

    I'm working on a vb6 project with Crystal Report 8.5 . I want to call a stored procedure from my app. After getting the result from my database, how to print it out directly without showing in the Crystal Report fist. Thanks

    S 1 Reply Last reply
    0
    • N Nine_

      I'm working on a vb6 project with Crystal Report 8.5 . I want to call a stored procedure from my app. After getting the result from my database, how to print it out directly without showing in the Crystal Report fist. Thanks

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      you can go with, Using Server-Side ReportDocument.PrintToPrinter Method or by Client Side JavaScript: window.Print. Using Server-Side ReportDocument.PrintToPrinter Method: The Syntax is : Report.PrintToPrinter(, , , ) Client Side JavaScript: window.Print: The Syntax is : function PrintWindow(){ if (navigator.appName == "Microsoft Internet Explorer") { var PrintCommand = '< O B J E C T ID="PrintCommandObject" WIDTH=0 HEIGHT=0 '; PrintCommand += 'CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">'; document.body.insertAdjacentHTML('beforeEnd', PrintCommand); PrintCommandObject.ExecWB(6, -1); PrintCommandObject.outerHTML = ""; } else { window.print();} } Hope this will Help you.

      Regards, Satips.:rose:

      N 2 Replies Last reply
      0
      • S Sathesh Sakthivel

        you can go with, Using Server-Side ReportDocument.PrintToPrinter Method or by Client Side JavaScript: window.Print. Using Server-Side ReportDocument.PrintToPrinter Method: The Syntax is : Report.PrintToPrinter(, , , ) Client Side JavaScript: window.Print: The Syntax is : function PrintWindow(){ if (navigator.appName == "Microsoft Internet Explorer") { var PrintCommand = '< O B J E C T ID="PrintCommandObject" WIDTH=0 HEIGHT=0 '; PrintCommand += 'CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">'; document.body.insertAdjacentHTML('beforeEnd', PrintCommand); PrintCommandObject.ExecWB(6, -1); PrintCommandObject.outerHTML = ""; } else { window.print();} } Hope this will Help you.

        Regards, Satips.:rose:

        N Offline
        N Offline
        Nine_
        wrote on last edited by
        #3

        Sorry, it doesn't clear me. Where is the code calling to crystal report? I used crystal report to format the report, but I don't want it to be shown before printing out

        S 1 Reply Last reply
        0
        • S Sathesh Sakthivel

          you can go with, Using Server-Side ReportDocument.PrintToPrinter Method or by Client Side JavaScript: window.Print. Using Server-Side ReportDocument.PrintToPrinter Method: The Syntax is : Report.PrintToPrinter(, , , ) Client Side JavaScript: window.Print: The Syntax is : function PrintWindow(){ if (navigator.appName == "Microsoft Internet Explorer") { var PrintCommand = '< O B J E C T ID="PrintCommandObject" WIDTH=0 HEIGHT=0 '; PrintCommand += 'CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">'; document.body.insertAdjacentHTML('beforeEnd', PrintCommand); PrintCommandObject.ExecWB(6, -1); PrintCommandObject.outerHTML = ""; } else { window.print();} } Hope this will Help you.

          Regards, Satips.:rose:

          N Offline
          N Offline
          Nine_
          wrote on last edited by
          #4

          I'm waiting for your help.........

          S 1 Reply Last reply
          0
          • N Nine_

            Sorry, it doesn't clear me. Where is the code calling to crystal report? I used crystal report to format the report, but I don't want it to be shown before printing out

            S Offline
            S Offline
            Sathesh Sakthivel
            wrote on last edited by
            #5

            The Code which i provided is just the sample for your understanding. I cannot do your work i have lot of work. Just for your Understanding purpose i have given some code what i have coded it for my application. Ok. For more Details get if from our best friend.

            Regards, Satips.:rose:

            N 1 Reply Last reply
            0
            • N Nine_

              I'm waiting for your help.........

              S Offline
              S Offline
              Sathesh Sakthivel
              wrote on last edited by
              #6

              I have work man. If i am free, surely i will help you. And in between try to get it from our Best Friend.

              Regards, Satips.:rose:

              1 Reply Last reply
              0
              • S Sathesh Sakthivel

                The Code which i provided is just the sample for your understanding. I cannot do your work i have lot of work. Just for your Understanding purpose i have given some code what i have coded it for my application. Ok. For more Details get if from our best friend.

                Regards, Satips.:rose:

                N Offline
                N Offline
                Nine_
                wrote on last edited by
                #7

                Thankz

                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