Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 19th, 2006, 06:58 AM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to fiiyo
Default Change Printer at run time for crystal rpt, VB6.0

hello every one, i wish to be able to change the printer which prints my voucher/reports designed in a Seagate crystal report after issueing a number of copies to an initial printer after the printer setup dialog box has been displayed.
i tryied using the PrinterName property which comes with the "Crystal Report Control" but it is not working. like this;
Private Sub cmdPrint_Click()
Dim vPrinter As Printer
    cdlDialog.Flags = cdlPDReturnDefault
    cdlDialog.Flags = cdlPDPrintSetup
    cdlDialog.ShowPrinter
rptMulty.PrinterName = vPrinter.DeviceName
If vDataType = False Then
rptMulty.DataFiles(0) = vDataFile
rptMulty.ReportFileName = vReportPath & "Voucher.rpt"
Else
rptMulty.Connect = strConn
rptMulty.DiscardSavedData = True
rptMulty.ReportFileName = vReportPath & "Voucher3.rpt"
End If

'Do Until vCount = vPrintQty
a$ = rstNewMaster("Serial")
'If vDataType = False Then
'rptMulty.SelectionFormula = "{MasterTable.Serial}= " & rstNewMaster("Serial")
'Else
'rptMulty.SelectionFormula = "{MasterTable.Serial}= '" & rstNewMaster("Serial") & "'"
'End If

rptMulty.Destination = crptToPrinter
rptMulty.Action = 1
vCount = vCount + 1
rstNewMaster("Status") = "-1"
rstNewMaster.Update
rstNewMaster.MoveNext
loop

sampong





Similar Threads
Thread Thread Starter Forum Replies Last Post
change Datasource of a crystal report at run time tiyyob Pro VB 6 1 February 17th, 2007 06:05 AM
how to change printer orientation from vb6 pkhussain VB How-To 3 January 3rd, 2007 03:30 AM
RUN-TIME ERRORS IN MY VB6 APPLICATION Nadalik VB How-To 1 June 15th, 2006 11:18 AM
Change group at run time in Crystal Report 9.0 by priyank Beginning VB 6 0 January 6th, 2006 06:11 AM
DAO Run Time Error 3423 - VB6 to Access2000 Iblys Access 1 September 25th, 2003 09:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.