Book a Demo

Author Topic: Error when using RunHTMLReport C# EA 7.5  (Read 4054 times)

Rémi Roy

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Error when using RunHTMLReport C# EA 7.5
« on: May 22, 2009, 01:37:17 am »
I want generated html document using API

when i run this code on xp sp2 is work perfectly
Code: [Select]
m_Repository = new RepositoryClass();
m_Repository.OpenFile(ConfigurationManager.AppSettings["ConnectionString"]);
StringBuilder pageInitial = new StringBuilder();
foreach (EA.Package p in m_Repository.Models)
{
        Directory.CreateDirectory(ConfigurationManager.AppSettings["OutputDirectory"] + "/Temp/" + p.Name);
        m_Repository.GetProjectInterface().RunHTMLReport(p.PackageGUID, ConfigurationManager.AppSettings["OutputDirectory"] + "/Temp/" + p.Name, "png", "<default>", ".htm");

But when i'm running this code in windows 2003 64 bit SP2
After some time my application generated this error

Quote
Unhandled Exception: System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x800
10105 (RPC_E_SERVERFAULT))
   at EA.ProjectClass.RunHTMLReport(String PackageGUID, String ExportPath, String ImageFormat, String Style, String Extension)
   at EAHtmlExport.Program.CreateHtmlReport(String outputDirectory)
   at EAHtmlExport.Program.Main(String[] args)


But when i'm used the same code with EA 7.1 on windows 2003 is work perfectly

Anyone have idea about this bug ?

Thanks  :)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Error when using RunHTMLReport C# EA 7.5
« Reply #1 on: May 22, 2009, 11:12:44 pm »
Do you have permission to create and populate a directory tree? The default permission sets granted by the two OS versions differ somewhat.
No, you can't have it!

Rémi Roy

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Error when using RunHTMLReport C# EA 7.5
« Reply #2 on: May 23, 2009, 06:29:44 am »
Yes i'm a administrator of the computer.


ChrisM

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Error when using RunHTMLReport C# EA 7.5
« Reply #3 on: June 03, 2009, 06:55:50 pm »
Hi there. Have you had any luck finding a solution.

We have the same error code from EA while trawling through our model to create a report. All we are doing is iterating through elements to get the data.

It works when run in debug and seems to work if we add enough delay while iterating through the elements using a list box to report the progress - the act of outputting strings to the form seems to make it work :o

Chris


EDIT: we found that using for loop instead of a foreach, then using the GetAt() method to get the object, it worked for us
« Last Edit: June 03, 2009, 07:57:57 pm by ArevaChris »

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Error when using RunHTMLReport C# EA 7.5
« Reply #4 on: June 04, 2009, 09:54:23 am »
Remi,

Can you confirm which build of EA 7.5 you have installed?  There was a known issue regarding generation of diagram images (and consequently HTML generation) in build 844.  If you have not done so already, update to EA 7.5 build 845 from our website and try running your code again.