C# Dynamic

6 posts, 0 answers
  1. Robin
    Robin avatar
    8 posts
    Member since:
    Jun 2017

    Posted 20 Jul 2017 Link to this post

    Is there going to be any support for C# Dynamic's?

    I am working on a multi-language report and there is no easy way to add multi-language to your reports. 

     

    The easyest way for me is to work with dynamics but the Telerik ReportDesinger isn't those properties. 

  2. Katia
    Admin
    Katia avatar
    693 posts

    Posted 24 Jul 2017 Link to this post

    Hello Robin,

    Dynamic objects are not supported out-of-the-box. You can check if the approach suggested in How to: Use ObjectDataSource with ExpandoObject KB article can be useful in your scenario.

    On the side note, changing the culture of the report can be achieved with report parameters. An example of this is ProductCatalog report located in Telerik Reporting installation folder.

    More details about report localization are provided in this help article.


    Regards,
    Katia
    Progress 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. Tursunhuja
    Tursunhuja avatar
    16 posts
    Member since:
    May 2018

    Posted 12 Jun in reply to Katia Link to this post

    Hi,
    I am also using the standalone report designer with an ObjectDataSource that returns ExpandoObject. The problem I have that the dynamic properties of ExpandoObject are now showing in the data explorer. I did create some new ExpandoObject objects and set property values as suggested in https://www.telerik.com/support/kb/reporting/details/how-to-use-objectdatasource-with-expandoobject

    Before I was using WebServiceDatasource and the properties were showing on data explorer. But, now we decided to use ObjectDataSource. So I don't have known properties, that's why I used ExpandoObject with dynamic properties. What should I do to show those dynamic properties in the Standalone Report Designer? Maybe I need to use another type of object rather than an expando object?

  4. Silviya
    Admin
    Silviya avatar
    403 posts

    Posted 14 Jun Link to this post

    Hi Tursunhuja,

    If I understood correctly, the requirement is to be able to see the inner data fields of the dynamically created ExpandoObject in design-time.

    Note that the Reporting engine uses System.Reflection to drill through types' properties. In design-time the custom properties of the ExpandoObjects are not available yet. In fact ExpandoObject is a collection of KeyValuePair, hence its properties are Key and Value as seen when the ObjectDataSource is fed with data by a method that returns an ExpandoObject. When that method is used, the returned type is a non-generic collection, which has no properties, hence nothing is displayed in the designer. So, I'm afraid the requirement cannot be achieved.

    Let us know if you have other questions.

    Best Regards,
    Silviya
    Progress 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
  5. Tursunhuja
    Tursunhuja avatar
    16 posts
    Member since:
    May 2018

    Posted 17 Jun in reply to Silviya Link to this post

    The problem here is that there is a limitation with your web service data source.  We were told to create an object data source.  See this post: www.telerik.com/forums/how-can-we-cancel-the-report. How do you show properties in the data explorer with your web service data source?
    We must be able to show properties in the data explorer.  
  6. Todor
    Admin
    Todor avatar
    333 posts

    Posted 19 Jun Link to this post

    Hello Tursunhuja,

    We have suggested a workaround for the particular scenario in the How can we cancel the report? forum post you have opened.
    Note also that the Data Explorer may dig only into the properties of objects that are not items of an array.

    Regards,
    Todor
    Progress 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
Back to Top