Book a Demo

Author Topic: SQL Based report > Display html special char ?  (Read 3188 times)

thierry72

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
SQL Based report > Display html special char ?
« on: February 11, 2013, 08:05:46 pm »
Hello,

I did a SQL query in order to do a report. It is working well.

The problem is about note field like <t_object.Note AS ElemNote>

The text displayed on the report is not decoded so I display "raw" text with html special char like =&gt; or <font color="#008000"> etc...

Is there a way to display decoded text ?

Thanks for your feedback.

Thierry

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SQL Based report > Display html special char ?
« Reply #1 on: February 11, 2013, 08:23:08 pm »
Thierry,

You'll have to use the api functions
Repository.GetFormatFromField() and  Repository.GetFieldFromFormat()
To convert the internal format to a format you like.

Geert

thierry72

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: SQL Based report > Display html special char ?
« Reply #2 on: February 12, 2013, 07:11:04 am »
Hello,

Thanks Geert for your fast feedback !

I tried to use the new SQL based fragment to template (V10 learning center => rtf fragment) from the template designer.
Mean I don't think I can use api methods to convert the Query result in rtf format.

I was thinking that there is some "magic, implicit" formating to display a SQL result in rtf format when using SQL based fragment.

Could you confirm that text result coming from a sql query created in the template designer can not be formatted ?

In that case,  :-?,  I will construt my report with scripting functionality in order to format query result correctly with repository methods you nicely mention

Thanks

Thierry