Book a Demo

Author Topic: HTML-markup in custom-report-Templates  (Read 4073 times)

BenediktRothe

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
HTML-markup in custom-report-Templates
« on: February 20, 2017, 04:37:11 am »
Hi

How to use notes with HTML-markup in custom-report-Templates?

In an Custrom-Report-Fragment I use in "Custom Query" the "Custom SQL"-Option an select
  SELECT t.Name, t.Note from t_object t where  t.Stereotype = 'ArchiMate_BusinessProcess' and Package_ID = #PACKAGEID#

With "Insert Custom Field" I add the field "Note".

EA generates a textfield and does no interpret HTML-markup. It creates text like "<p level="0">xxxx</p>

Any suggestions?
Benedikt




Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: HTML-markup in custom-report-Templates
« Reply #1 on: February 22, 2017, 04:04:12 pm »
You'll have to a make it a document script fragment, and convert your HTML to RTF and return that.

I'm sure there are libraries out there that that you can use to do the conversion (Use MS Word if you can't find a better alternative). I don't think the Repository.GetFormatFromField, or GetFieldFromFormat operation will help in this case.

Geert

BenediktRothe

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: HTML-markup in custom-report-Templates
« Reply #2 on: February 22, 2017, 07:33:33 pm »
Mmh ... ok ... what a pity ...

There's a simple JavaScript-Converter: http://jsfiddle.net/JamesMGreene/2b6Lc
Maybe this is good enough ...

At least I know a direction - thanks
Benedikt
You'll have to ...  convert your HTML to RTF...

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: HTML-markup in custom-report-Templates
« Reply #3 on: March 06, 2017, 09:22:25 am »
If you return a column name ending with .Formatted or -Formatted then the report engine with insert the appropriate formatted text.

See http://sparxsystems.com/enterprise_architect_user_guide/13.0/model_publishing/custom_sql_fragments.html