Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: helpme3 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
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
-
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