Localizing the Viewer Control

In ActiveReports, you can localize settings for the Windows Forms Viewer control by modifying a provided "strings" text file, generating a resources file, embedding the resources file in your ActiveReports project and adding the localization code needed in your Form_Load event.

L- References

L- References

■=0 ActiveReports ■=0 ActiveReports.Vie

Making localization changes to the strings text file To make changes to the text file

1. Click here (Script/Strings.txt) to open the text file in your browser.

2. Right-click on the text and select "View Source."

3. This will open the file in Notepad. Make changes to localize settings for the viewer control.

4. Click on Save As..., rename your text file "localization.txt" and save it to your location of choice.

Generating the resources file from the text file To generate the resources file

1. From the Start bar, click on All Programs > Microsoft Visual Studio.NET > Visual Studio .NET Tools > Visual Studio .NET Command Prompt.

2. Change the prompt path to reflect the location of your localization.txt file.

3. Type "resgen localization.txt localization.resources" .

4. This creates a resources file in the same location as the text file.

Adding the resources file to your Windows application To add the resources file

1. Open your ActiveReports Windows application which includes a Windows Form with an ActiveReports Windows Forms Viewer control.

2. In the Solution Explorer window, click on the icon to "Show All Files".

3. Right-click on the name of your project and click Add > Add Existing Item...

4. Select the appropriate file path to the localization.resources file and click Open.

5. This adds the resources file to your application.

Was this article helpful?

0 0

Post a comment