Technical FAQs

Ask a Question

Reports are running manually but not automatically via Windows Scheduled Tasks.

Goals and Symptoms

Reporter can generate the reports manually but fails when a report is requested via Windows Scheduled Tasks. The report fails right around the Post Report Macro returning the "Error 2147417851". Scheduling the reports using either of the repgen.exe and the reportgen.exe returns the same result.
Additionally, the error message "Automation error: The server threw an exception has occurred in pmlRepGenScheduling" pops up following the details:

Error is thrown at line in PerformPostProcessing procedure:
ss.Copy after:=ReportWorkbook.Worksheets(ReportWorkbook.Worksheets.count)

Value for ReportWorkbook.Worksheets.count in Watch window is:
The remote server machine does not exist or is unavailable

Causes and Fixes

The problem is a security-related issue, since the error is coming from code that tries to run an Excel macro. Make sure the "Log on as" account that the "Task Scheduler" service is running under is the same account that Reporter uses to successfully run manual reports.

Additionally, a stray EXCEL process is not left open when a report is generated through the normal Reporter interface. Please make sure that there is not an orphaned EXCEL process present and running on the server.

  1. Quit Excel (if it's running)
  2. Open Task Manager and look for any running process(es) named EXCEL
  3. End any Excel processes that are running, but shouldn't be

Last Revised: November 13, 2007
Applies To: ION Enterprise
All content © 1992-2007 Schneider Electric
Was this helpful?
What can we do to improve the information ?