Author Topic: API: Insert Text in RTF report  (Read 3996 times)

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
API: Insert Text in RTF report
« on: November 21, 2012, 07:10:09 pm »
Hello,

I'm using API for creation RTF report and running into the one problem: when I'm writing a new line I wanted to use a font style which is different from Normal style and after report generation I see the style is Normal anyway.
The code is:
EA.DocumentGenerator generator = new Repository.CreateDocumentGenerator();
generator.NewDocument("MyDocument");
generator.InsertText("BlaBla","Title"); //NOT Normal

Someone has any solutions for it?

Thanks.

RobCDeJong

  • EA User
  • **
  • Posts: 27
  • Karma: +4/-0
    • View Profile
    • Soltegro site
Re: API: Insert Text in RTF report
« Reply #1 on: November 21, 2012, 08:53:10 pm »
Adding a "\n" to the text will help:

generator.InsertText("BlaBla\n","Title");

zalbina

  • EA User
  • **
  • Posts: 149
  • Karma: +0/-0
    • View Profile
Re: API: Insert Text in RTF report
« Reply #2 on: November 21, 2012, 09:30:56 pm »
Thanks a lot. Soooooo simple :).