This is a generic debugging question that arose because of a very specific problem I am having. I have a flat datasource bound to a XamPivotGrid. The PivotGrid works great if I specify that the DataSource use DimensionGenerationMode = DimensionGenerationMode.Property. However, when I define cube metadata and specify that the data source use DimensionGenerationMode.Metadata, I later get an exception when I bind the XamPivotGrid DataContext to this DataSource.
I already know that there is something wrong either with the data I have or with how I defined the Metadata. I just CAN'T figure out what.
So my question is this: Is there any way to enable extra diagnostic debug output in the Infragistics NetVantage WPF Library? I am using version 13.1 of the library so it is a fairly recent version. It would be nice if I could identify better where the problem is being created.
Sincerely,
Louis
Just a quick followup. It appears that the problem is with the data that is pulled in from the database. I load the data via Entity Framework from a SQL database. The same as I have done in may other applications that work.
I get the following exception:
{"Cube metadata is not found for DimensionsGenerationMode.Metadata mode."}
The stack trace shows that this exception is being thrown from the function:
Infragistics.Olap.FlatData.FlatDataModelProvider.ResolveDimensionsMetadata()
When I create some dummy data of the same types, I don't get the exception. My conclusion is that the metadata resolver for some reason can't see the metadata when it comes from an Entity Framework. I wish I could figure out where things are going wrong with the data from the database. If there were extra diagnostic output from the Ingragistics libraries, that might help me narrow down the problem.
Hello Louis,
Thank you for your post. I have been looking into it and I can say that our controls doesn’t expose additional functionality for Debugging. You can use the same techniques as the ones for MS controls. Also if you could send us an isolated sample project, where the issue is reproduced, we will be able to investigate this further for you.
Looking forward for your reply.
Hello Stefan,
Thanks for your reply. I did actually narrow down the problem. What were were doing was databinding the PivotGrid to a list that came from a database query via Entity Framework 5. The problem was that one of the properties was being lazy loaded in EF and was also not properly bound to the database data. Instead of throwing an exception higher up in the stack I believe this was causing the exception to happen in the ResolveDimensionsMetadata() method because somewhere earlier on it couldn't find metadata.
The root of the problem was really our data. However, the exception that I saw from ResolveDimensionsMetadata() was really not super helpful. I resolved the issue by changing our Entity Framework model to not use dynamic proxies (disable lazy loading).
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.