-1

Hi I am trying to generate report programmatically from EA using C#.

Project.RunReport

By referring this.

But the problem is RunReport allows to choose only main template by passing the parameters

PackageGUID: String - the GUID of the Package or master document to run the report on

TemplateName: String - the document report template to use; if the PackageGUID has a stereotype of MasterDocument, the template is not required

FileName: String - the file name and path to store the generated report; the file extension specified will determine the format of the generated document - for example, RTF, PDF

How to set coverPage and TOC using this RunReport API call..?

Community
  • 1
  • 1
Dah Sra
  • 4,107
  • 3
  • 30
  • 69

1 Answers1

0

Your report should already have a Cover page and TOC defined with it Seems like you will need to use DocumentGenerator or add the TOC Manually after the document is generated as you cannot insert a TOC in a Report Template.

If you want to define those separately, use the DocumentGenerator facility

Document Generator Reference

Mart10
  • 758
  • 3
  • 14
  • Hi @Mart10 Thanks for the reply. I already have TOC and CoverPage defined in my template .My question is how to pass these two values in RunReport API call ,because It only allows to pass main template . RunReport is used to generate document with already created templates in EA. – Dah Sra Jul 05 '17 at 13:41
  • @dahsra you dont need to pass them if they are included, they should generate along, like I said, they need to be inside the template you would select when using the generate documentation window. If the TOC and cover page are not inside the template, then you need to use DocumentGenerator – Mart10 Jul 05 '17 at 13:54
  • how to include them in main template – Dah Sra Jul 05 '17 at 14:03
  • @My bad, seems like you cannot add a TOC in a Report Template, However for the cover page, just paste it in. If you want the TOC, you either have to use the Document Generator, or add it manually on the document generated – Mart10 Jul 05 '17 at 14:12