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,
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)