Book a Demo

Author Topic: RunHTMLReport and Windows Service  (Read 3558 times)

Eamonn John Casey

  • EA User
  • **
  • Posts: 110
  • Karma: +0/-1
    • View Profile
RunHTMLReport and Windows Service
« on: May 03, 2017, 10:13:20 pm »
I am using this code to run a report but it keeps failing when the machine is logged off. Anyone have tried this and got it to work?

Thanks in advance.
Eaomnn J.

Code: [Select]
private static Repository repo = new Repository();
private static Project project;

repo.OpenFile2(options.SourceFile, options.UserName, options.Password);
project = repo.GetProjectInterface();
packageName = repo.GetPackageByGuid(options.Package).Name;
project.RunHTMLReport(options.Package, options.TargetFIle, "png", templateName, "html");       
repo.Exit();

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: RunHTMLReport and Windows Service
« Reply #1 on: May 03, 2017, 11:33:07 pm »
You are the 37th (or something) to ask this very same question.
The answer is still: No, you have to have an interactive session for something like this to work, but the guys from LieberLieber have apparently succeeded in running EA as a service, and they have posted an article about that on their website.
Apart them them I've never heard of someone else being able to achieve that.

Most users give up and set up an old pc somewhere in a corner with a post-it that says: "Don't turn off!" and run their scripts from the windows scheduler on that machine.

Geert