hexagon logo

2016 report printing issue

I've been using the same vb.net application to print (PDF and hard copy) from PCDMIS 2011 for a few years now. In 2016 it no longer works the same. After printing once, it will not print a second time. PCDMIS doesn't even flinch when the second set of commands are called. If I print the PDF first, it skips the hard copy, if I print the hard copy first, it skips the PDF...no matter what, it will not print twice in a row, like it used to. We have upgraded 7 machines to 2016, all have the same problem.

Any thoughts??


'print to PDF

[FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]prt.EditWindow.SetPrintOptionsEx(PCDLRN.[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]PCDPRINTLOC[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].PCD_FILE, PCDLRN.[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]ENUM_PCD_ON_OFF[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].DMIS_ON, PCDLRN.[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]PCDPRINTFILEMODE[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].PCD_NEWFILE, 1, [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]sPath[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2], PCDLRN.[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]PCDFILEPRINTFORMAT[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].PCD_PDF, [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]False[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2])[/SIZE][/FONT][/SIZE][/FONT]
[FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]RepWin.PrintReport()

'print hard copy

prt.EditWindow.SetPrintOptions([/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]PCDPRINTLOC[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].PCD_PRINTER, [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]ENUM_PCD_ON_OFF[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].DMIS_ON, [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]PCDPRINTFILEMODE[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].PCD_OVERWRITE, 1)[/SIZE][/FONT][/SIZE][/FONT]
[FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]RepWin.PrintReport()[/SIZE][/FONT][/SIZE][/FONT]


Parents
  • why don't you print & pdf at the same time?

    SetPrintOptionsEx's first paramter is where to output. I don't know VB method of or'ing 2 variables together (c++ would be PCDLRN.PCDPRINTLOC.PCD_FILE | PCDPRINTLOC.PCD_PRINTER)

     prt.EditWindow.SetPrintOptionsEx(PCDLRN.PCDPRINTLOC.PCD_FILE, PCDLRN.ENUM_PCD_ON_OFF.DMIS_ON, PCDLRN.PCDPRINTFILEMODE.PCD_NEWFILE, 1, sPath, PCDLRN.PCDFILEPRINTFORMAT.PCD_PDF, False)  
     RepWin.PrintReport()



    vs. ( again not sure about combining the values) Maybe just adding them together?

     prt.EditWindow.SetPrintOptionsEx(PCDLRN.PCDPRINTLOC.PCD_FILE | PCDPRINTLOC.PCD_PRINTER  
     , PCDLRN.ENUM_PCD_ON_OFF.DMIS_ON, PCDLRN.PCDPRINTFILEMODE.PCD_NEWFILE, 1, sPath, PCDLRN.PCDFILEPRINTFORMAT.PCD_PDF, False)  
     RepWin.PrintReport()


    the 2nd method will generate the output for both file & printer.
  • I didn't know you could combine them! I simply used "Or" in place of the pipe, and it works perfectly. Thanks for that!!
Reply Children
No Data