Programming SSRS report design Components / Controls (Textbox etc.) at runtime using .net programming

  • Dear Forum viewers / members,

    I am facing a severe problem related to RDL programming. In case there is not direct resolution available with SQL Server and its exposed components please suggest some workarounds if possible at all. I need it very badly as a lot of things are at stake due to this problem.

    The background:

    We are generating a report which have column captions as well as some fixed texts. The peculiarity is that the captions and / or texts have got translations in 9 different international languages. Based upon the selection of the language in the User interface we need to show the corresponding captions, fixed texts in the selected langauge. Lets say my Report has got "Item Count :" + {Some field value}. If the end user selects Italian then the same thing should show "{Italian Translation for "Item Count :}" + {Some Field value}

    The proposed solution:

    We planned to tackle this by reading the available translations and setting them in the respective textboxes just before loading the RDL file in the report viewer.

    The Problem:

    I need to get the list of all the text boxes available in my RDL design so that based on some key (textbox name or something like that), I can read or write text in the text box. The same has to be controlled from .net front end.

    I need the solution at the earliest possible time and thus its a humble request to you one and all to just help me out. Please involve your friends and friends of friends who are working in similar technologies or may have come across such requirements.

    In case you feel more details are required feel free to let me know that too, I will be more than happy to do anything to get this sorted out.

    Thanks a lot for one and everything small or big.

    Thanks a lot.

    In short I expect a runtime substitution kind of facility as we have in Crystal Report where one can use the index of the formula field and substitute with new text and the report utilizes the same while displaying. In that case the report file remains unchanged only runtime rendering of data is affected. The same kind of behaviour I want in SSRS reports from .net environment. Thanks a lot.

  • Not sure if this is what you want, but can't you just use an expression for the textbox value which changes the text depending on the language parameter?

    Something like this should work:

    =IIF(Parameters!language.Value,"Italian","Italian Count"),IIF(Parameters!language.Value,"English","Item Count")

    [font="Verdana"]Markus Bohse[/font]

  • Dear Markus,

    Thanks a ton for your reply.

    Actually this approach can't be used as this needs to hardcode the translation. But our approach needs to read the translation while generating the report.

    The may have changed the text for the caption viz, we may have coded for "Item Count", but they may want to see "Counta de Itemos" something like that in some langauge. Please forgive me for the translation as this is for illustration only and no way is an actual translation in any of the languages.

    In short, I am talking of runtime substitution of text data in SSRS reports from .Net.

    Thanks a lot once again

    Take Care

    GOD bless you and all.

  • amartha_dutta (6/17/2009)


    Dear Markus,

    Thanks a ton for your reply.

    Actually this approach can't be used as this needs to hardcode the translation. But our approach needs to read the translation while generating the report.

    The may have changed the text for the caption viz, we may have coded for "Item Count", but they may want to see "Counta de Itemos" something like that in some langauge. Please forgive me for the translation as this is for illustration only and no way is an actual translation in any of the languages.

    In short, I am talking of runtime substitution of text data in SSRS reports from .Net.

    Thanks a lot once again

    Take Care

    GOD bless you and all.

    I think you can still do it using expressions. Just use a dataset which contains your various language values and the use the values from the dataset instead of the hardcoded values I used in my example.

    I know you can also use .Net code in your report efinition, but I'm not .Net programor and I have never used them.

    Here's an article on how to do it

    http://www.code-magazine.com/Article.aspx?quickid=0701061

    [font="Verdana"]Markus Bohse[/font]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply