Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Define measures dynamically. Clarification needed around SourcePropertyName
posted

Dear support team,


I am investigating the ability to have measure metadata loaded dynamically. My approach is to have a list of measures containing the property names. Based on that I would add new DimensionMetadata with SourcePropertyName set to the aforementioned property name.

Then the cube's data type would be a DynamicObject with its TryGetMember implemented to return the value corresponding to the measure having the same name as what was specified in the SourcePropertyName.

The issue I'm facing is that TryGetMember is never called, and I suspect it is due to how SourcePropertyName is used. Is it maybe that it uses reflection to only look for public properties matching whatever is in SourcePropertyName and avoid invoking the property (which would trigger TryGetMember) if it doesn't find it?

Perhaps if you could shed some light on how SourcePropertyName is used, it would help understanding what the issue is and the feasibility of solving it.

Thanks and regards,

Tamas

Parents
  • 23930
    Offline posted

    Hi Tamas,

    I don’t believe the XamPivotGrid and the FlatDataSource were designed to be used with DynamicObjects. We use reflection in order to get the value and as you said this doesn’t work with DynamicObjects.

    Please provide me with a small sample that demonstrates what you are trying to do and I will see if there is any way to get it running with the PivotGrid.

    I am looking forward to hearing from you.

Reply Children