Book a Demo

Author Topic: RTF documentation via JS automation locks up EA  (Read 3292 times)

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
RTF documentation via JS automation locks up EA
« on: August 21, 2009, 05:52:31 pm »
The following bug has been reported by me:
==========================
Using the automation interface one can call the "RunReport" method from the project interface. When instead of a package ID an element ID is given EA displays the message "ADODBField[-2146825267] Either BOF or EOF is true, or the current record has been deleted. Requested operation requires a current record". After acknowledging the message twice EA starts creating a document from an unknown source and locks up in the process.
This does not occur when doing the same püeration manually by selecting the element and pressing F8.

Select an element and run the following JavaScript over it (adapt the template name if necessary):

function main()
{
      var pi = Repository.GetProjectInterface();
      var obj = Repository.GetTreeSelectedObject();
      
      print("running");
      
      if (obj!=null)
      {
            print("Name of object:" + obj.Name);
            print("Type of object:" + obj.Type);
            var elGUID=obj.ElementGUID;
            print ("GUID:"+obj.ElementGUID);
            pi.RunReport(obj.ElementGUID,"Use Case","c:\\temp\\uc.rtf");
      }      
}

main();
====================

Oliver

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: RTF documentation via JS automation locks up E
« Reply #1 on: August 24, 2009, 07:05:08 pm »
Update: Dermot has confirmed this bug and passed it on for fixing in the next release.

Oliver