This is a migrated thread and some comments may be shown as answers.

C# Dynamic

5 Answers 197 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Robin
Top achievements
Rank 1
Robin asked on 20 Jul 2017, 10:08 AM

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. 

5 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 24 Jul 2017, 02:24 PM
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
0
Tursunkhuja
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 12 Jun 2019, 06:08 AM

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?

0
Silviya
Telerik team
answered on 14 Jun 2019, 01:59 PM
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
0
Tursunkhuja
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 17 Jun 2019, 07:31 AM
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.  
0
Todor
Telerik team
answered on 19 Jun 2019, 02:51 PM
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
Tags
Report Designer (standalone)
Asked by
Robin
Top achievements
Rank 1
Answers by
Katia
Telerik team
Tursunkhuja
Top achievements
Rank 2
Iron
Iron
Veteran
Silviya
Telerik team
Todor
Telerik team
Share this question
or