Archi Forum

Discussion Boards => General Archi Discussion => Topic started by: Jose-Carlos on May 09, 2019, 09:01:20 AM

Title: Custom colors not used when generation Jasper report with ACLI
Post by: Jose-Carlos on May 09, 2019, 09:01:20 AM
Hi,
I have changed the default colors through menu Edit/Preferences/Colours and Fonts.
When I publish a Jasper report through Graphical interface, it works fine and I have custom colors on my generated documents.
When I use ACLI, reports are generated using default colors.
Is it the expected behavior?
Title: Re: Custom colors not used when generation Jasper report with ACLI
Post by: Phil Beauvoir on May 09, 2019, 09:30:06 AM
Hi Jose-Carlos,

I tested this and it is working for me.

Archi stores the color preferences in a preference file that will be located according to the path set in Archi.ini file:

-Dosgi.instance.area=@user.home/AppData/Roaming/Archi4

Are you using the same Archi installation for both Archi UI and Archi CLI, or is the path different as set in Archi.ini? Or perhaps you are logged in as a different user and @user.home will therefore be different?
Title: Re: Custom colors not used when generation Jasper report with ACLI
Post by: Phil Beauvoir on May 09, 2019, 09:49:39 AM
If you are using separate instances of Archi, or different user preference locations, there is a way to actually store the color as defined in preferences in the model file. It is set in the preference "Save the default colours for elements in the model file" on the same preference tab.
Title: Re: Custom colors not used when generation Jasper report with ACLI
Post by: Jose-Carlos on May 09, 2019, 14:32:30 PM
Hi Phil,

I didn't fully described the issue and I found why I have different result.
ACLI is called from Apache Web server through a Windows service which is executed at the system level. In this case, the environment variable @user.home is not set. It's why I had different behavior.
I have modify the Archi.ini to set a static path and it's working fine now.
Thanks a lot for your support.