I was wondering if someone is able to help. I need to be able to create a PrintDocument object from a generated crystal report within vb.net. I have previously used the following for printing a document (please see attached code). The requirement has now changed to the user now needing a .PDF copy. I am using novaPdf which I am able to call but I need to pass through a PrintDocument object in order to get it to work.
Dim objReport As clsReport
Dim objFrmReport As New frmreport
Dim objUD17 As clsUD17
Dim myReport As PackSlip
objOrder = New clsOrder ' Created for the connection
objUD17 = New clsUD17(dtBatch, objOrder.getConnection) ' pass the connection
' objUD17.CheckBatch() ' Check the batch
myReport = New PackSlip()
objReport = New clsReport(dtBatch)
myReport.PrintOptions.PrinterName = "HP LaserJet 1100 (MS)"
myReport.PrintToPrinter(1, True, 1, 0)
' dtBatch = objUD17.getDt ' return the datatable as this could have items that have been removed due to them being scanned.
'objUD17.CheckBatch() ' Check the batch
objUD17.createNewBatch() 'Create the new batch
objReport = Nothing
objFrmReport = Nothing
objOrder = Nothing