Book a Demo

Author Topic: HTML report not loading in Web Browser  (Read 3148 times)

Pedro

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
HTML report not loading in Web Browser
« on: February 20, 2014, 06:34:18 pm »
Hello,

I'm currently using the RunHTMLReport method of Repository object to automatize the report generation.

The reports, however, are not loading in any web browser. I have enable JavaScript in all of them, but I only get a "Loading..." message and nothing more.

Thus, I tried to export the HTML report directly from EA (shift + F8). And, surprisingly, the result was the same.

In the javascript console from Chrome, I have the following message: Uncaught TypeError: Cannot read property 'length' of null . It appears to happen in the following method:

Code: [Select]
function changeCSS(theClass, element, value, target)
{
      var cssRules;
      target = eval(target + '.document.styleSheets');

      if (browser == 'ie6' || browser == 'ie7')
      {
            cssRules = 'rules';
      } else if (browser == 'ff' || browser == 'op')
      {
            cssRules = 'cssRules';
      }

      for (var S = 0; S < target.length; S++)
      {
            for (var R = 0; R < target[S][cssRules].length; R++)
//Uncaught TypeError: Cannot read property 'length' of null
            {
                  if (target[S][cssRules][R].selectorText == theClass)
                  {
                        try
                        {
                              target[S][cssRules][R].style[element] = value;
                        }
                        catch (e)
                        {
                        }
                  }
            }
      }
}

What can I do about it? I'm generating the report with the following method call:

Code: [Select]
r.GetProjectInterface().RunHTMLReport(r.GetProjectInterface().GUIDtoXML(modelGuid), outputPath, imageFormat, "<default>", ".html");

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: HTML report not loading in Web Browser
« Reply #1 on: February 21, 2014, 10:44:22 am »
What version of EA are you using?

I recall having fixed that in the default template at some point.