Does anyone have any idea what could be causing this issue
The holighted Cell Value should be the "Sum" of the groups "Items" but its total seems to be the same as the Items under Material even though there is no data in that Group for the Price Field
I've also included the code I wrote to calculate the totals for the Price Line. It only appears to happen if the entire gruop has a zero total
If I remove the PartName grouping the issues gets solved.
Inside of ds_AggregateMeasure
if (e.MeasureDescriptor.Name == "Price") { decimal total = 0M; decimal count = 0M; foreach (object o in e.Items) { var item = o as FrBudget; if (item != null) total += item.Price; count += 1M; } e.Value = total; e.Handled = true; }
It appears to happen to ANY meassure which has a TOTAL of 0
Hello Jose,
We cannot determine what the problem is from the code snippet you posted here, as your logic seems to be valid. In order to help us investigate further, could you please provide us with a sample which reproduces the issue? Any other information you could give us would be valuable as well.
ok this took quite a bit of work but I think it SHOULD be replicated in this example
Here is the example link
http://wikisend.com/download/981602/PivotData_IF.zip
and here is the "DATA" that it loads. This is an XML file it loads from
C:\IF\Budget.xml
I trust you'll be able to change this in the code to load form whatever location you'd like. It was the only way I could figure out how to send you the data to relplicate
http://wikisend.com/download/265704/IF.zip
To Replicate simply launch the project and place the XML file in the correct location (or modify the source to match your location of choice)
Line 133 in Form1.cs
StreamReader sr = new StreamReader(@"C:\IF\budget.xml");
Then run the project,
You will see I have it broken down by 3 rows Line Type, ProductID, and PartName
If you expand Line Type and ProductID
You'll see I have 2 Product ID's "G1" and "Material"They both show with a Price Total of 933,234.83
However if you expand GI you'll see that none of the GI -> PartNames have any value in that column yet the total still shows up
Also if I remove the additional TotalCost measure the value then works ok, but adding any additional measures breaks it
Jose,
I cannot download from the link you sent me because our security software blocks downloads from that site. You should be able to attach the .zip file right into this forum thread.
If the file is too large to be able to attach here, try deleting the bin directory, which takes up a lot of space and is unecessary for me to build and run the sample. If it is still too large, you can upload the file here: https://filetransfer.infragistics.com/public.php?service=files&t=559ccfe7089dff00971d73a9758b4626
Please let me know if you are able to follow any of these avenues to send your sample.