Skip to main content
Solved

How can I add visible expression for Locale selection?

  • 23 July 2024
  • 8 replies
  • 60 views

Hello all,

How can I add a visible expression for localization. I have 2 images. One is in english & other in German. I am looking to add a visible expression that when the Locale = English and my first image should be display and when Locale = German then my second image should be displayed.

8 replies

Userlevel 7
Badge +5

Hi @Harry 

Please refer to the post below which may help you.

 

Best Regards,

NNT

Userlevel 5
Badge

Hi @Harry 

Please refer to the post below which may help you.

 

Best Regards,

NNT

Hey @nhatnghetinh , thanks for your prompt response. I am looking to add a visible expression for localization. On the basis of the languages selected under the Locale option:
 

 

Userlevel 7
Badge +5

Hi @Harry 

What images do you want to display? Is it a logo image?

Best Regars,

NNT

Userlevel 5
Badge

Its just simple image. The images are already translated its just I need to add them in the report.
 

 

Userlevel 7
Badge +5

Hi @Harry 

Because your images can be converted to text, the simple solution you can do is as follows without locale.
You convert the image content into text format and create a table in Report Designer
You create 2 Report Designers. For example:
1/. Sales Order Form - English. Create a table in Report Designer like the content of the English image
2/. Sales Order Form - German. Create a table in Report Designer like the content of the German image

 

Best Regards,

NNT

Userlevel 5
Badge

Hi @Harry 

Because your images can be converted to text, the simple solution you can do is as follows without locale.
You convert the image content into text format and create a table in Report Designer
You create 2 Report Designers. For example:
1/. Sales Order Form - English. Create a table in Report Designer like the content of the English image
2/. Sales Order Form - German. Create a table in Report Designer like the content of the German image

 

Best Regards,

NNT

Any other workarounds? As it is really a long table 😅 with loads of text.

Userlevel 7
Badge +5

Hi @Harry 

Another way is similar to above, instead of creating a text table, you create a PictureBox. This method is more complicated because you need to know how to get the image for the PictureBox.

You create 2 Report Designers. For example:

1/. Sales Order Form - English. Create a PictureBox in Report Designer with English image

2/. Sales Order Form - German. Create a PictureBox in Report Designer with German image

Please refer how to get the image for the PictureBox as the posts below:

https://www.augforums.com/forums/acumatica-report-designer/images-for-a-report/

https://stackoverflow.com/questions/57500203/how-to-reference-external-image-by-url-in-report-designer

 

 

Best Regars,

NNT

 

Userlevel 6
Badge +2

Hi @Harry 

I’d also suggest looking into the create of a new unbound field, with a logic that will determine proper localization at the moment and will find an appropriate image reference (using some custom logic, I’m painting it in broad strokes right now). Then you could try to use that said reference to add image to the report.

To set up the field value, you could try to create custom attribute that inherits PXEventSubscriberAttribute and IPXFieldSelectingSubscriber.

Reply