Skip to content

Instantly share code, notes, and snippets.

@accasey
Created October 15, 2018 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save accasey/45d32190e99c0980e193a56ef7d3ced4 to your computer and use it in GitHub Desktop.
Save accasey/45d32190e99c0980e193a56ef7d3ced4 to your computer and use it in GitHub Desktop.
Generate the file in the Process Monitor secondary page
Local string &path;
SQLExec("SELECT PRCSOUTPUTDIR FROM PS_CDM_LIST WHERE PRCSINSTANCE = :1", &processInstance, &path);
%This.ReportDefn.OutDestination = &path;
%This.ReportDefn.ProcessReport(%This.TemplateId, %Language_User, %Date, %This.OutputFormat);
/* publish */
If %OutDestType = 6 Then /* Web */
%This.ReportDefn.Publish("", "", "", &processInstance);
Else;
If %OutDestType = 3 Then /* Printer */
%This.ReportDefn.PrintOutput(%FilePath);
Else
If %OutDestType = 5 Then /* Email */
&bResult = %This.ReportDefn.EmailOutput(&processInstance);
End-If;
End-If;
End-If;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment