I have a VB.2010 Application. I design it so, that we can print some reports to a special pinter.
Now we have set the "Use no Printer" Option for reports that we distribute to another location.
If i open it via code, then it is not possible to change the destination printer. If the report save the last printer, then it is possible.
My code to change the printer is following
If PrinterName <> ""Then _ErrorCode = ShowRPTFileErrorCodes.PrinterNotAvailable
cryRpt.PrintOptions.DissociatePageSizeAndPrinterPaperSize = False
cryRpt.PrintOptions.PrinterName = PrinterName
Else
cryRpt.PrintOptions.DissociatePageSizeAndPrinterPaperSize = False
cryRpt.PrintOptions.PrinterName = Interface.Printer.CurrentPrinter
EndIf
If i check the name of the printer with cryRpt.PrintOptions.PrinterName then it´s empty string
I using CR2011 - in our application we have CR4VS2010 (13_0_4)