Hello,
We're currently working on an application which supports dynamic properties, created by the users of our application. We want these properties to be available to our users when they're designing a report with the standalone report designer.
In our codebase (c#) a class with dynamic property support looks like:
[DataObject]
public
class
Employee {
public
string
Id {
get
;
set
; }
public
string
Name{
get
;
set
; }
public
List<DynamicProperty> DynamicProperties {
get
;
set
; }
}
public
class
DynamicProperty {
public
string
Name {
get
;
set
; }
public
object
Value {
get
;
set
; }
}
Let's say one of our users created 2 dynamic properties for Employee:
- Title
- Adres
When we load Employee into the report designer as object data source, it displays:
- Id
- Name
- DynamicProperties
But what we would actually like to see is:
- Id
- Name
- Title
- Adres
We thought of a couple solutions for our problem:
- Use web service data source so we can generate json, based on the dynamic properties. We don't actually want to use a web service for this.
- Runtime compile a new class with the flattened properties and use this as object data source. Seems like a lot of effort for what seems to be a small problem.
Since we don't actually want to use any of these solutions I was wondering if there is an easier way to deal with this problem.
Thanks in advance!
Kind regards,
Rick Brants