|
-
Apr 26th, 2006, 06:32 AM
#1
Thread Starter
Member
Printing Report Details (VB6 with CR9)
I am generating a report from VB6 using CR9 which shows a selection of information (this works perfectly)
In this report preview there is a "Print" button and when I select it it comes up with a very brief window with the printer settings (only telling me what printer i am printing to and if i want to print all the pages or a range of them) I would like to view a more detailed print window which gives me the normal options that I would usually get when selecting the print button on all other applications!!
Any help would be much appreciated!!
-
Apr 26th, 2006, 11:50 AM
#2
Re: Printing Report Details (VB6 with CR9)
Are you using the CRViewer to preview the report? It contains a PrintButtonClicked event. You can then code the prompting for a printer, maybe using the CommonDialog or PrinterSetupEx of the Report object.
Set the UseDefault argument of the Event to False and Crystal will not show any dialogs.
-
Apr 28th, 2006, 06:30 AM
#3
Thread Starter
Member
Re: Printing Report Details (VB6 with CR9)
This is one of the most annoying pieces of code I have had the pleasure is sorting out...
I found loads of help of the subject out there and thanks to brucede for your help, that got the ball rolling and I ended up with the following code:
VB Code:
Dim Report As CRAXDRT.Report
Private Sub CRView_PrintButtonClicked(UseDefault As Boolean)
UseDefault = False
'Brings up the print dialog box
Report.PrinterSetup Me.hwnd
'If 'Cancel' is selected will cancel print job
If Err.Number <> 0 Then
Report.PrintOut False
Else
'Means 'OK' was selected and will print out
Report.PrintOut True
End If
End Sub
It is commented and basically when the print button is selected a print dialog box appears allowing for more detailed changed to be made to the report printing settings, hope other people find this helpful...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|