Binding "Culture" from a DataSource Property

2 posts, 0 answers
  1. Kamesh
    Kamesh avatar
    1 posts
    Member since:
    Dec 2013

    Posted 08 Apr Link to this post

    Hi,

    I am evaluating Telerik Reports for our project requirements. I would like to know whether it is possible to set the Culture value of the report (en-US, es-MX, etc.) from a DataSource property. The culture information is returned as part of the data source and we are trying to build the report based on the value returned from the DB during run-time. I tried to set the Culture value in the 2 ways shown below, but both didn't work.

    1) this.Bindings.Add(new Telerik.Reporting.Binding("Culture", "= SampleReport.getCulture(ReportItem.DataObject.RawData)"));

    2) this.Culture = new System.Globalization.CultureInfo("= {Fields.[CultureInfo]}");

  2. Katia
    Admin
    Katia avatar
    305 posts

    Posted 13 Apr Link to this post

    Hello Kamesh,

    Our recommendation is to add a report parameter that will store the culture information passed from the data source. You can then add the binding to the report as following:

    Property path: Culture
    Expression: = Parameters.Culture.Value

    You can find attached a sample report demonstrating this approach. If the suggested approach is not suitable for your scenario you can open a support ticket and provide more details about it (attach a sample project together with test data).


    Regards,
    Katia
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top