ProcessAnalyst printing

I have a PA trend page like:

I would like to hide the toolbar on top:

and use the print icon on top:
  

The AN number of the PA page is AN139

I have this code:

FUNCTION PrintProcessAnalyst()

OBJECT hAnalyst;
hAnalyst = ObjectByName("AN139");
_ObjectCallMethod(hAnalyst , "Print", "");

END

but when I press the printer button on top nothing happens.

I call the function like:

Any idea how to fix this or how to call the print dialog from the toolbar using the print icom on top?

Parents Reply Children
  • Hi Jan,

    You can untick the 'Include Legend" checkbox here: Set up Report Legends

    From memory, the options you choose are also persisted in the PAV file. So if you save a PAV file with this option "off" and then use that as a basis for future PAV files, then the legend will be always off. (I haven't tested, but I believe that will work)

    Note: We have discovered that in Windows 11 22H2 and later Microsoft has made a breaking change which updated the Print dialog to a  modern one, but dropped support for customisations. The Process Analyst adds 2 custom tabs to the print dialog for "Legend" and "Report" and these are no longer accessible. You can modify the registry to restore the original behaviour:
    [HKEY_CURRENT_USER\Software\Microsoft\Print\UnifiedPrintDialog]
    Add a new DWORD key "PreferLegacyPrintDialog", with a value of 1.

    We will aim to fix that as soon as we can.

  • 'From memory, the options you choose are also persisted in the PAV file. So if you save a PAV file with this option "off" and then use that as a basis for future PAV files, then the legend will be always off. (I haven't tested, but I believe that will work)'

    Perfect memory !

    This works.

    Thanks.