Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling Window's 'Print Window' in CR9

Status
Not open for further replies.

CrystalReports9

Programmer
Jan 10, 2003
124
US
Hi

I am viewing cyrstal reports from 'Power Builder' application and using the 'CRViewer' to display the report. The CRViewer has a print button but does not allow the user to change the printers from their default printer.

To overcome the above issue i wrote the script in the 'printbuttonclicked' event the following code for to hide the default CR's 'Printer Setup'

'printbuttonclicked' event
--------------------------
usedefault= FALSE
ole_Report.PrinterSetup(0) --> To popup the WINDOWS Printer Setup)
ole_Report.Printout(False) --> To Hide the default CR's 'Printer Setup')

Question:
-----------
After called the Window's default 'Printer setup' if i click the 'CANCEL' button in the default Window's printer setup window, still my report get printed. (Based on the above code). How to overcome this issue?

Any suggestion Pls....!!!
 
In VB you can test the user didn't clicked Cancel by using code such as:
------------------------------------------------------
If Report.PrinterSetupEx(Me.hwnd) = 0 Then
...
------------------------------------------------------

I assume similar code should work in PB.

Cheers,
- Ido



CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top