Aurelia Reporter Overview
5) Automation and Running Reporter From an Application
Reporter’s powerful command line interface allows advanced users to automate common document conversion
tasks and even add HTML save and send capability to any application. For example the following command line:
ASReport /save="C:\My Documents\html\$(source).htm" "C:\My Documents\*.doc"
will save every .doc file in your “My Documents” folder to a correspondingly named html file.
If you’re running Reporter from an application you can use the /wait flag to configure Reporter then wait for your
application to create the report. The following “C” language example will programmatically generate an HTML e-
mail of a report generated from an application:
// Execute the command line and return the process handle (i.e. ShellExecuteEx)
Handle = ExecuteCmd("ASReport /email@example.com /subject=\"Invoice #1003\" /wait");
// now do whatever you need to do to send Invoice 1003 to the Reporter printer
// And then wait on the process handle to know when the print job is done (i.e. WaitForSingleObject)
Though the above example is in C, this method will work just as easily with Visual Basic or any other language
that allows you to execute a DOS command line.