Skip to content

Commit

Permalink
Update extract-inline-images-picturebox-telerik-reporting.md (#1581)
Browse files Browse the repository at this point in the history
* Update extract-inline-images-picturebox-telerik-reporting.md

* Update dot-net-core-support.md

* Update currency-formatted-textbox-does-not-render-correctly-in-certain-environments.md
  • Loading branch information
todorarabadzhiev authored Jan 7, 2025
1 parent 4e6550e commit 5dc8f25
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
6 changes: 6 additions & 0 deletions getting-started/installation/dot-net-core-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ To use Telerik Reporting in a Windows container, target a Windows-based image wi

The Microsoft-distributed `microsoft/windowsservercore` images contain the GDI+ graphics library. However, their size is significantly bigger than the size of the .NET runtime in a Linux container. Such a container requires you to install only the libgdiplus library and its accompanying libraries.

>tip Some Docker Containers are created with __invariant culture__. This means that the locales like currency symbol ('$' in 'en-US') may appear unexpected. Use the following code in the Dockerfile to add your culture ('en-US' in the example) to the container:
>
> `ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8`
>
> `LC_ALL` stands for all locales, and `LANG` stands for the language.
### Linux Docker Container with `SkiaSharp`

Starting with [R3 2023 (17.2.23.1010)](https://www.telerik.com/support/whats-new/reporting/release-history/progress-telerik-reporting-r3-2023-17-2-23-1010) we introduced SkiaSharp-based graphics engine, which is cross-platform. The active graphics engine is determined by the value of the __engineName__ element of the [processing Element]({%slug telerikreporting/using-reports-in-applications/export-and-configure/configure-the-report-engine/processing-element%}) which corresponds with the members of the [Telerik.Drawing.Contract.GraphicsEngine enumeration](/api/telerik.drawing.contract.graphicsengine).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
---
title: Currency formatted textbox does not render correctly in certain environments
description: The currency symbol renders incorrectly in certain environments
title: Currency Formatted Textbox Renders Wrong in Certain Environments
description: "Learn why the currency symbol renders incorrectly in certain environments and how to fix the problem."
type: troubleshooting
page_title: The currency symbol is wrongly encoded
slug: currency-formatted-textbox-does-not-render-correctly-in-certain-environments
position:
tags:
ticketid: 1548378
res_type: kb
---

## Environment

<table>
<tbody>
<tr>
Expand All @@ -20,34 +19,43 @@ res_type: kb
</tbody>
</table>


## Description

The rendered report document contains weird symbols in place of the currency symbol in the textboxes that have currency formatting applied.

When determining what Culture to use for formatting strings and text direction, the rendering engine will inspect those objects in the following order:

1. The Culture of the TextBox.
1. If the TextBox has no Culture defined, the Culture of the Report is used.
1. If the Report has no Culture defined, the Culture of the **CurrentThread** is used.

2. If the TextBox has no Culture defined, the Culture of the Report is used.
## Cause

3. If the Report has no Culture defined, the Culture of the **CurrentThread** is used.
This is caused by the environment, where the report is rendered, having a different culture than the machine, where the report was designed, or an invariant culture.

For example, if the production environment had a specific culture, which currency symbol was not available in the font used by the textbox.

## Possible Cause
## Solution

This could be caused by the environment, where the report is rendered, having a different culture than the machine, where the report was designed.
### Docker Containers

For example, if the production environment had a specific culture, which currency symbol was not available in the font used by the textbox.
Some Docker Containers are created with __invariant culture__. This means that the locales like currency symbol ('$' in 'en-US') may appear unexpected. Use the following code in the Dockerfile to add your culture ('en-US' in the example) to the container:

## Solution
````powershell
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false\
# Set the locale
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8
````

1. You may wrap your textbox's __Value__ expression in the __FormatWithCulture(cultureName, format, args)__ [text function]({%slug telerikreporting/designing-reports/connecting-to-data/expressions/expressions-reference/functions/text-functions%}) to ensure that the textbox will be formatted with that specific culture.
In the above code, `LC_ALL` stands for all locales, and `LANG` stands for the language.

2. You may set the [Report.Culture](/api/telerik.reporting.report) to a specific culture that will be used whenever the report is rendered.
### Other Environments

1. You may wrap your textbox's __Value__ expression in the __FormatWithCulture(cultureName, format, args)__ [text function]({%slug telerikreporting/designing-reports/connecting-to-data/expressions/expressions-reference/functions/text-functions%}) to ensure that the textbox will be formatted with that specific culture.
1. You may set the [Report.Culture](/api/telerik.reporting.report) to a specific culture that will be used whenever the report is rendered.

## See Also

* [Report Globalization]({%slug telerikreporting/designing-reports/report-globalization%})

* [Text Functions]({%slug telerikreporting/designing-reports/connecting-to-data/expressions/expressions-reference/functions/text-functions%})
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To extract and save the original image embedded in a PictureBox within a Telerik
1. Navigate to the `Images` folder within the extracted contents. Here, you will find the original image file embedded in the PictureBox.
1. Once located, you can copy the image file to another location for editing or use as needed.

**Important:** Always work with a copy of the report file to avoid any potential data loss or corruption of your original report template.
>important Always work with a copy of the report file to avoid any potential data loss or corruption of your original report template.
## See Also

Expand Down

0 comments on commit 5dc8f25

Please sign in to comment.