Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: EAPowerUser on February 23, 2021, 08:18:00 pm

Title: Document Generation - Images in notes aren't displayed properly after SQL filter
Post by: EAPowerUser on February 23, 2021, 08:18:00 pm
Hi all,

When I'm adding images to a text field e.g. input on test objects and export it via Generate Documentation, the image is displayed properly. Once I used a SQL fragment e.g. to filter objects and export input as a column (Select t_tests.input as input; custom> {input} <custom), the image is printed like:
<a href="$imageman://id=0;msg=Wireframing::Save;name=Save;type=Bitmap;"><font color="#0000ff"><u>Wireframing::Save</u></font></a>.

I'm using Image manager to add in the image into text fiel.

Best Regards
Title: Re: Document Generation - Images in notes aren't displayed properly after SQL filter
Post by: Geert Bellekens on February 23, 2021, 08:35:57 pm
It shouldn't work either way (notes fields don't support images), but what you are missing from your SQL fragment is to set it to formatted.

In you query you do something like

Code: [Select]
select o.Note as [description-Formatted] from t_object o where o.object_ID = #OBJECTID#
In the template you do
Code: [Select]
custom> {description.Formatted} <custom
This works for SQL server. You might need to change the dash to a dot for .eap files.

Geert
Title: Re: Document Generation - Images in notes aren't displayed properly after SQL filter
Post by: EAPowerUser on February 23, 2021, 09:20:19 pm
Hi Geert,

It worked!
You made my day. Thought I would lose SQL functionality on to get images printed correctly.

Thanks a lot!