I am using CR 8.5 with VB 6.
My users needed the ability to select one of many printers, so I used the following:
Private Sub CRViewer1_PrintButtonClicked(UseDefault As Boolean)
UseDefault = False 'Don't use the default printer
Dim cOrientation As CRPaperOrientation
Dim cSize As CRPaperSize
'Get the report's current orientation and paper size
cOrientation = crrpt.PaperOrientation
cSize = crrpt.PaperSize
crrpt.PrinterSetup Me.hwnd 'Call the Printer Setup dialog
'Loop through the Printers collection to ensure the correct _
printer gets set for the report
Dim p As Printer
For Each p In Printers
If p.DeviceName = crrpt.PrinterName Then
crrpt.SelectPrinter p.DriverName, p.DeviceName, p.Port
Exit For
End If
Next p
'Reset the report's PaperOrientation and PaperSize properties _
to override the "new" printer's defaults
crrpt.PaperOrientation = cOrientation
crrpt.PaperSize = cSize
'Prompt the user for page numbers, copies, etc.
crrpt.PrintOut True, 1
End Sub
The problem I have is some of the reports have drill-down capabability. When a user attempts to print a drilled-down portion of a report, the entire report is printed. Does anyone know how to tell CR which "view" to print?
Rene'
My users needed the ability to select one of many printers, so I used the following:
Private Sub CRViewer1_PrintButtonClicked(UseDefault As Boolean)
UseDefault = False 'Don't use the default printer
Dim cOrientation As CRPaperOrientation
Dim cSize As CRPaperSize
'Get the report's current orientation and paper size
cOrientation = crrpt.PaperOrientation
cSize = crrpt.PaperSize
crrpt.PrinterSetup Me.hwnd 'Call the Printer Setup dialog
'Loop through the Printers collection to ensure the correct _
printer gets set for the report
Dim p As Printer
For Each p In Printers
If p.DeviceName = crrpt.PrinterName Then
crrpt.SelectPrinter p.DriverName, p.DeviceName, p.Port
Exit For
End If
Next p
'Reset the report's PaperOrientation and PaperSize properties _
to override the "new" printer's defaults
crrpt.PaperOrientation = cOrientation
crrpt.PaperSize = cSize
'Prompt the user for page numbers, copies, etc.
crrpt.PrintOut True, 1
End Sub
The problem I have is some of the reports have drill-down capabability. When a user attempts to print a drilled-down portion of a report, the entire report is printed. Does anyone know how to tell CR which "view" to print?
Rene'