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

Printtoprinter method error

Status
Not open for further replies.

DirectOne

IS-IT--Management
Dec 26, 2002
62
US
I am printing a report with one discrete parameter and am getting "Microsoft.visualbasic.errObject"

I am trying to print to a specific printer using the code below

Thanks,

Code:
selectedreport = New ReportDocument

Dim bolPar As CrystalDecisions.Shared.ParameterValues
Dim bolpard As New CrystalDecisions.Shared.ParameterDiscreteValue

selectedreport.Load(packingslip_path)

bolPar = selectedreport.DataDefinition.ParameterFields.Item("Bol").CurrentValues
bolpard.Value = txt_bol.Text
bolPar.Add(bolpard)
            selectedreport.DataDefinition.ParameterFields.Item("Bol").ApplyCurrentValues(bolPar)

selectedreport.PrintOptions.PrinterName= "\\belmont\packlist"
selectedreport.PrintToPrinter(1, True, 0, 0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top