Manually Running a Specific Report

The reports-run-now-xml function enables you to run a specific report in real-time, immediately receiving the information that the report provides and waiting until the report is finished before you proceed. This is very similar to the reports-system-reporting function, except that the reports-run-now-xml function enables you to run an existing report rather than simply retrieving all report entries of a specified type.

Note: Because this function creates the specified report in real-time and is not using the report-service, manually running a report with this function can take a long time for large reports. In most cases, you should use the reports-enqueue function to create reports, so that they can be created asynchronously by the reporting service without directly impeding the execution of your application.

The parameters to the reports-run-now-xml function (ReportsRunNowXml in the SOAP API) are the following:

The following is an example of a call to the SOAP API version of the reports-run-now-xml function in C#:

ReportsRunNowXml rrnx = new ReportsRunNowXml();
rrnx.report = "system-errors";
rrnx.id = "errors";
rrnx.maxitems = 1000;
rrnx.start = new DateTime(2009, 9, 11, 0, 0, 0, System.DateTimeKind.Local);
rrnx.end = new DateTime(2009, 9, 25, 0, 0, 0, System.DateTimeKind.Local);
XmlElement reportxml = port.ReportsRunNowXml(rrnx);

Once this call returns the XML elements that comprise your report, your application can parse and use the reporting information however you'd like.