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