Script to print crystal report to designated printer

SUGGESTED

Everything works on the script except for the line that calls for the print

oRpt.Printout

(I tried oRpt.Printout(FALSE) but then nothing happens at all)

The line actually technically works, but instead of just printing the the default printer, the printer diolog box pops up and asks for a printer selection.

When OK is pressed the report prints.

I would like to avoid this step and have the report print without additional input.

i would also like to specify the printer if say for example the label printer is not their default printer.

thanks in advanced

Parents
  • 0
    SUGGESTED

    2023 Update, This script no longer works in Sage due to Crystal Reports no longer supporting (apparently not supported since Crystal Reports ver. 2012)

    Set App = CreateObject("CrystalRuntime.Application")

    You can run the workstation in MAS90 mode and install Crystal Reports, version 8 and make sure the Reports are written in Crystal Version 8. But this is poor practice.

    I was able to re-write the script for Sage 100 2022 utilizing

    oSession.GetObject("SY_ReportEngine")

    and its functions.

    SY_ReportEngine (sage.com)

    Once you look into the functions, it is quite slick. You can use Sage directly along with security, Pass variables, Define Printers, Number of Copies, print or even preview the report.

Reply
  • 0
    SUGGESTED

    2023 Update, This script no longer works in Sage due to Crystal Reports no longer supporting (apparently not supported since Crystal Reports ver. 2012)

    Set App = CreateObject("CrystalRuntime.Application")

    You can run the workstation in MAS90 mode and install Crystal Reports, version 8 and make sure the Reports are written in Crystal Version 8. But this is poor practice.

    I was able to re-write the script for Sage 100 2022 utilizing

    oSession.GetObject("SY_ReportEngine")

    and its functions.

    SY_ReportEngine (sage.com)

    Once you look into the functions, it is quite slick. You can use Sage directly along with security, Pass variables, Define Printers, Number of Copies, print or even preview the report.

Children
No Data