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

Printing a Blank Page

Status
Not open for further replies.

BradB

MIS
Jun 21, 2001
237
US
CR 8.5
Windows NT 4.0 SP6a
Visual Basic 6.0 SP4
Two Forms:
frmMain is used to select the report.
frmRDC is used to view the report.

I'm using RDC to create a report distribution control. I've created the following code in hopes of using Windows Standard Printer Setup dialog box when the print button is clicked. Currently, when I click the Print button, it prints a blank page. No matter what printer I select, it prints a blank page. What am I doing wrong? Also, when I click Print, Print Setup check box defaults to No Printer. I have to click on the checkbox to allow the multiple printer dialog box.

You can see an example of this on Crystals site Article ID c2006318.

Dim Report As New CR1

Option Explicit
Private Sub CRViewer1_PrintButtonClicked(UseDefault As Boolean)

UseDefault = False
Report.PrinterSetup frmRDC.hWnd
Report.PrintOut False

End Sub

--BradB
 
Is that ALL that it prints, a blank page, or does it print your report with a blank page?

How does the report execute if you run it from Crystal and not from VB? Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
>>Is that ALL that it prints, a blank page, or does it print your report with a blank page?

It only prints a BLANK page. NO report!

>>How does the report execute if you run it from Crystal and not from VB?

The report works great IN Crystal. Since Crystal allows you to print to any printer, everything prints fine. I probably don't have the code in VB working properly yet. There just ins't a good example of RDC programming for using different printers other than the default.

--BradB




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top