Globalized Enum
Globalized Enum
Hello,
I have a problem, which I can not solve. I still use globalized labels in the reportdesigner via setting the "Globalized Name" property and putting the text into a resx-file. But I'm not able to globalize enum-values. I would like to put an enums-value into the report by using his int-value and in the report I would like to see a depending text. The text should be localiced.
E.g. SomeEnum with values from 0 to 2 should show the globalized text "test 1", "test 2", "test3".
How can I solve this? Can I set globalized labels used in an expression or something like that?
Thanks in advance!
Regards,
Thorsten
I have a problem, which I can not solve. I still use globalized labels in the reportdesigner via setting the "Globalized Name" property and putting the text into a resx-file. But I'm not able to globalize enum-values. I would like to put an enums-value into the report by using his int-value and in the report I would like to see a depending text. The text should be localiced.
E.g. SomeEnum with values from 0 to 2 should show the globalized text "test 1", "test 2", "test3".
How can I solve this? Can I set globalized labels used in an expression or something like that?
Thanks in advance!
Regards,
Thorsten
Globalized Enum
Hello,
Can you please describe your task in details? And, if possible, send us a sample.
Thank you.
Can you please describe your task in details? And, if possible, send us a sample.
Thank you.
Globalized Enum
Hello Aleksey,
I try to describe with more details. I know how to globalize an textlabel in the report-layout via designer. I set the "Globalized Name" property with an id and put the text into a resx-file. Before I show the report, the resx-file will be defined in the GlobalizationManager class. This works perfectly.
But I only get this work with textlabels where I can set the "Globalized Name" property via Gui. I don't know how handle different type of text. E.g. in expressions. I often have to handle enum values. E.g. the reports receive int values which I want to translate into humanreadable text. "0" shall be displayed as "Test Example 1", "1" for "Another Test Example 2".
The expression which do this can look like this:
{switch (DataSource.FieldName == 0, "Test Example 1", DataSource.FieldName == 1, "Another Test Example 2")}
But how to use the globalization feature in this expression of an layout? How can I put the text into resx-files to make it translateable?
I hope I could make my point clear.
Regards
I try to describe with more details. I know how to globalize an textlabel in the report-layout via designer. I set the "Globalized Name" property with an id and put the text into a resx-file. Before I show the report, the resx-file will be defined in the GlobalizationManager class. This works perfectly.
But I only get this work with textlabels where I can set the "Globalized Name" property via Gui. I don't know how handle different type of text. E.g. in expressions. I often have to handle enum values. E.g. the reports receive int values which I want to translate into humanreadable text. "0" shall be displayed as "Test Example 1", "1" for "Another Test Example 2".
The expression which do this can look like this:
{switch (DataSource.FieldName == 0, "Test Example 1", DataSource.FieldName == 1, "Another Test Example 2")}
But how to use the globalization feature in this expression of an layout? How can I put the text into resx-files to make it translateable?
I hope I could make my point clear.
Regards
Globalized Enum
Hello,
You can add yours text strings to the resx-file, and then use the following expression:
For example, you can add strings "test1", "test2" and then write
Thank you.
You can add yours text strings to the resx-file, and then use the following expression:
Code: Select all
{this.GlobalizationManager.GetString("name_of_your_text")}
Code: Select all
{switch (DataSource.FieldName == 0, this.GlobalizationManager.GetString("test1"), DataSource.FieldName == 1, this.GlobalizationManager.GetString("test2"))}
Globalized Enum
That was exactly what I needed.
Thanks a lot!
Regards
Thanks a lot!

Regards
Globalized Enum
Hello,
Great!
Let us know if have additional questions.
Thank you.
Great!
Let us know if have additional questions.
Thank you.