Localization of Reporting Services-Reports (.rdl /

2019-05-14 02:28发布

i need to localize a Reporting Services-report (.rdlc) and i would like to do it using a ressource-file (.resx).
I found pages like this and that and they use custom code to achieve their target.
But pages like Setting the Report Language Parameter in a URL give me the impression that localization in reports is possible without custom code.

So, it is possible to localize a Reporting Services-report without custom code ?
If so, is there a tutorial that explains how it's done?

3条回答
叛逆
2楼-- · 2019-05-14 03:01

What in the report do you want to localize?

  • values from the database? Those should be retrieved from the database in the appropriate language already

  • fixed labels and textboxes on the report? I have not yet seen any compelling way to doing this - you can either have

    • one report "skeleton" / template per language (and pick the one you need)
    • if the number of elements is manageable, define report parameters which you can set from the calling code, to set the labels and texts
    • use some custom .NET extension for handling localization

It's not really an awfully pretty picture, indeed - I'd be most interested in better solutions myself! (I typically need to support 3-4 languages for any report - and I'm using only server-based .RDL files, no .RDLC, so any localization that depends on client-side resource files is not usable in my case)

查看更多
老娘就宠你
3楼-- · 2019-05-14 03:12

I would add one method when it comes to labels and textboxes:

  • Create a placeholder element within the textbox and use Expression field to use a Switch clause , switching on the Language parameter.

It's not superpretty, but also works pretty well for 3-4 languages

查看更多
神经病院院长
4楼-- · 2019-05-14 03:19

I am passing parameters to the report for labels etc, and after adding the parameters to the report (using the menu option Report -> Parameters in VS2008) you can then use the values of these parameters to localise the labels. This is workiiing well enough, although it would be nicer to be abkle to refer to resource keys immediately from your form labels etc.

查看更多
登录 后发表回答