Creating a Multilingual RDL Report: A Step-by-Step Guide
Tags: localization, ssrsreportdesigner, multilingualreport, reportdesigner
Published: 2023-05-03 13:02:00

Bold Reports is a powerful tool that allows you to create and deploy reports for your organization. One important aspect of creating reports is localizing them to different languages so that users can view data in their language. In this blog, we will discuss how to create a multilingual RDL report using Bold Reports and the Lookup function.

In this blog, I am using this [report](https://github.com/boldreports/resources/blob/master/blog/multilingual-rdl-report/multilingual-report-before.rdl/?utm_source=dev.com&utm_dev.com=partner_blog&utm_campaign=dev_multilingualrdlreport_bpexternal). This report has a simple table with three columns, bound to AdventureWorks sample MSSQL Server data. I will explain how to customize its header cells with multiple languages.

**Step 1: Create a language parameter.**

The first step in creating a multilingual RDL report is to create a language parameter. This parameter will allow users to select their preferred language when viewing the report. You can create a language parameter by following these steps:

1. Open the report in the Bold Reports [Standalone Report Designer](hashnode).
2. In the Design tab, select the parameters icon in the right-hand menu.

![This blog explains how to create a multilingual RDL report using Bold Reports. | Standalone Report Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lfx4wntx1lle8xf009jw.png)Parameters

3. Click **+ NEW PARAMETER **to add a new parameter.

4. In the Parameter Name field, provide the value **Language**.

5. In the Prompt field, provide the value **Select a language**.

6. In the Data Type field, select String.

![This blog explains how to create a multilingual RDL report using Bold Reports. | Standalone Report Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p5bxxeq8ti8pd0qdu29r.png)Defining Report Parameter

7. Click on the Assign Values link in the Available Value field, and enter the language name and language codes for each language you want to support. For example, “en-US” for United States English, “fr-FR” for France French, and so on.


![This blog explains how to create a multilingual RDL report using Bold Reports. | Standalone Report Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fi13k3rqo9ht53axe70o.png)Report parameter values

**Step 2: Create a data set for localized text**.

Once you have created the language parameter, you need to create a data set that contains the localized text for each language. This data set should have three columns: one for the language code, another for the localized text key, and the last one for the localized text. The following image shows the data source from my MSSQL Server.


![This blog explains how to create a multilingual RDL report using Bold Reports. | Standalone Report Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vwxlxlwagoo2cqa78rns.png)Table of localized text

You can create a data set in the Bold Reports Standalone Report Designer by following these steps:

1. In the Standalone Report Designer, select the Data tab.

2. Click the Dataset tab to create a new data set. Choose the database where the localized strings are stored. I am using the MSSQL Server as the database, so I select it.

3. Provide the data set name. This name will be used in the Lookup function to retrieve data. I will explain this in a subtopic.

![This blog explains how to create a multilingual RDL report using Bold Reports. | Standalone Report Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbxah7aqkv1tiih52okf.png)Create a data set to retrieve localized text

4. In the data designer, toggle to Code mode so that you can use the parameter values along with the query.

5. In the Query Designer, enter a query that selects the localized text and its corresponding key for each language. For example, you can use the following SQL query:

```
SELECT LocalizedText, LocalizedTextKey
FROM LocalizedTextTable
WHERE LanguageCode = @Language
```
In this query, replace “LocalizedTextTable” with the name of your table that contains the localized text, and “LanguageCode,” “LocalizedText,” and “LocalizedTextKey” with the names of your corresponding columns.

![This blog explains how to create a multilingual RDL report using Bold Reports. | Standalone Report Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/83fnuspgj77u6xw7k0vg.png)Code with report parameter

6. Click Finish to save the multilingual data set.

**Step 3: Use the Lookup function to display localized text.**

To display the localized text in your report, you can use the **Lookup** function available in the Report Designer. The Lookup function is used to retrieve a value from a data set based on a specified key value. In our case, the key value is the localized text key selected by the user, and the data set contains the localized text for each language.
To use the **Lookup **function, follow these steps:

1. Select the element in your report that you want to localize. In my example report, I am using a table. So, I select its first column header cell.

2. In the Properties pane, find the Content field and click **Expression** to open the Expression Editor.
Adding an expression in Standalone Report Designer.
Adding an expression

![This blog explains how to create a multilingual RDL report using Bold Reports. | Standalone Report Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/chwtmtetsur6d3dgufom.png)Adding an expression

3. In the Expression Editor, enter an expression like the following:

`=Lookup(“<Table header text>”, Fields!LocalizedTextKey.Value, Fields!LocalizedText.Value, "LocalizedTextDataset")`

Here are the sample **Lookup** expressions using static values:

```
=Lookup("Sales ID", Fields!LocalizedTextKey.Value, Fields!LocalizedText.Value, "LocalizedTextDataset")
=Lookup("Order Quantity", Fields!LocalizedTextKey.Value, Fields!LocalizedText.Value, "LocalizedTextDataset")
=Lookup("Unit Price", Fields!LocalizedTextKey.Value, Fields!LocalizedText.Value, "LocalizedTextDataset")

```
In these expressions, replace “LocalizedTextDataset” with the name of your data set that contains the localized text for each language.

![This blog explains how to create a multilingual RDL report using Bold Reports. | Standalone Report Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a1rgblcmt8c5q2zzubl7.png)Expression with Lookup function

4. Click OK to save the expression. That’s it! You have created a multilingual RDL report.

**Step 4: Run the multilingual RDL report.**

Click **Preview **in the Standalone Report Designer. You can see the option to select a language.

![This blog explains how to create a multilingual RDL report using Bold Reports. | Standalone Report Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/239irh5fqk8owlpzb69b.png)Multilingual RDL report with the language parameter

Select a language and click View Report. You can see the localized report.

![This blog explains how to create a multilingual RDL report using Bold Reports. | Standalone Report Designer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1w8evhs1b4r7jkukqmce.png)Multilingual report displaying French text

You can download this sample multilingual RDL report from [here](hashnode).

**Conclusion**
That’s it! In this blog, we have discussed how to create a multilingual RDL report using Bold Reports and the Lookup function. By following these simple steps, you can create reports that are accessible to users in different languages. To learn more about the Report Designer and its report items, look through our [documentation](hashnode). To experience the features live, check out our online [demo](https://demos.boldreports.com/angular/#/report-designer?utm_source=dev.com&utm_dev.com=partner_blog&utm_campaign=dev_multilingualrdlreport_bpexternal).

If you have any questions, please post them in the comments section below. You can also contact us through our [contact page](https://www.boldreports.com/contact/?utm_source=dev.com&utm_dev.com=partner_blog&utm_campaign=dev_multilingualrdlreport_bpexternal), or if you already have an account, you can [log in](hashnode) to ask your question.

Bold Reports offers a [15-day free trial](hashnode) without any credit card information required. We welcome you to start one and experience Bold Reports for yourself. Try it and let us know what you think!

Catch us on Twitter, Facebook, and LinkedIn for info about upcoming releases.