Book a Demo

Author Topic: RunReport on master document  (Read 3017 times)

helpme3

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
RunReport on master document
« on: December 16, 2008, 07:17:33 pm »
Hi,

I'm trying to write an Addin to EA to generate a report and call some scripts afterward. Now i have a problem with the RunReport(string,string,string) command provided by the API during the following code
Code: [Select]
Project aProject = theRepository.GetProjectInterface();
Package aPackage = theRepository.GetTreeSelectedObject() as Package;

Collection aCollection = aPackage.Element.TaggedValues;
String aTemplate = null;
foreach (TaggedValue item in aCollection)
{
    if (item.Name == "RTFTemplate")
    aTemplate = item.Value;
}

if (String.IsNullOrEmpty(aTemplate))
   return;

aProject.RunReport(aPackage.PackageGUID, aTemplate, @"C:\TEMP.RTF");
Now it seems to me that EA is using the master document as normal package and ignores the virtual documents inside. Is there any way to generate a master document with the EA.Interop API?


Thank you very much

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: RunReport on master document
« Reply #1 on: December 16, 2008, 07:45:35 pm »
Quote
Now it seems to me that EA is using the master document as normal package and ignores the virtual documents inside. Is there any way to generate a master document with the EA.Interop API?

Well, I find it very likely that this is true. What happens, if you omit the template parameter in the RunReport call?

If this does not change things I suggest to file a bug report. Virtual documents are a rather new feature and it propably it went forgotten in the automation interface.

Oliver