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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using report viewer control, set to print 1 page? 1

Status
Not open for further replies.

CraigBest

Programmer
Aug 1, 2001
545
US
Hi there

I'm using the SCR Report Viewer control (version 8.5) in a VB6 program. In the process of printing a document through the viewer, I would like to set it to print only the first page of any document sent to it. Been looking for some documentation on this control and have not found any in what I have. Can anyone direct me to the property or method I want here?

Thanks

Craig in NJ
 
You can use the PrintOut method, which takes the following parameters:

PrintOut([promptUser], [numberOfCopy],[collated],[startPageN], [stopPageN])

So, you could call it like this if you're using the CRViewer:
Code:
Private Sub CRViewer1_PrintButtonClicked(UseDefault As Boolean)
    UseDefault = False
    CrxRpt.PrintOut False, 1, True, 1, 1
End Sub
-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top