Hi,
I have a windGrid multiband
The first band is call root. In this root band there are always only 2 rows
My goal is to do a summary on each column but only on the First rows of the root band
Actualy both rows are summaries which is not the result that i would like to do.
Is it possible by programmation to add a condition to filter all the second row of the band root
All first row have a color as backgroud in each cells and all the second row are white as background
Thanks in advance !
I'm afraid I am having a hard time understanding exactly what you want. Are you talking about a summary applied to the root band or to the child bands?
Do you simply want to hide the second row on the root band?
You might need to use a CustomSummaryCalculator and calculate the summary value yourself. But it's hard to say if there is any easier way without really understanding exactly what you are trying to acheive.
Yes I am talking about a summary on the Root band only
I also have Child band but I dont summaries them and this work
My Root band is also summaries.
My goal is to summary all columns but only the first row of the Band root but in each root band we have 2 rows
and actualy all rows are summaries which is the defaut behavior.
I have a invisible columns LineType that indicate me if the actual row is the first or second row
So if the invisible columns LineType=1 then summarise the values
LineType ColumnsA ColumnsB
1 10 20
2 5 11
Summary 10 20 <== (This is what i would like to have as a result)
Actualy I have 15 31 <== (This is what i have as a result)
Is there a way or a condition in a formula that I can summaries only the linetype 1?
Thanks in advance! :)
Well, it's hard for me to suggest any ways you might optimize the sumaries, since you didn't include the code for your CustomSummaryCalcuator here.
UltraCalcManager summaries are calculated asynchronously (by default), so you might get more responsive UI using CalcManager instead.
Hi Mike,
I finaly obtain the result I want with the CustomSummaryCalculator
The problem I got now is that when I change a value in my grid it took around 20 second to update all the summary columns
This is the way I use the CustomSummaryCalculator and I implement the CTotalSummaryWithOutPoTerms class with the condition I want in it
Is there something I can do to optimise the calculation?
I dont use any CalcManager . Is that the raison of my problem?
For i As Integer = 1 To NumberOfcolumnToShow
myBand.Summaries.Add(i.ToString, SummaryType.Custom, New CTotalSummaryWithOutPoTerms(i.ToString), myBand.Columns(i.ToString), SummaryPosition.UseSummaryPositionColumn, Nothing)
myBand.Summaries(i.ToString).SummaryDisplayArea = SummaryDisplayAreas.BottomFixed
myBand.Summaries(i.ToString).DisplayFormat = "{0}"
myBand.Summaries(i.ToString).Appearance.TextHAlign = HAlign.Right
Next
End Sub
Thanks in advance
calvinchan said:Forgive me for jumping into you guys' conversation.So I am trying to use my CustomSummaryCalculator to do the calculations. How can I get the rows that only belong to that group then? Is there like a property that I can use to get the group number or something in the BeforeSummaryDialog event handler?Thanks!!
Forgive me for jumping into you guys' conversation.
So I am trying to use my CustomSummaryCalculator to do the calculations. How can I get the rows that only belong to that group then? Is there like a property that I can use to get the group number or something in the BeforeSummaryDialog event handler?
Thanks!!
I found the solution. Event BeginCustomSummary actually give me all the rows belong to the the same group.
Thank you anyways.
Calvin
Okay, that's a different story.
There are several ways to do this.
1) If you group by the LineType column, then the summaries will be broken up automatically into each group.
2)You could add an unbound column to the for each LineType and set the Formula of that column to use an 'if' function. Basically, the unbound column's formula would be something like this:
if ( [LineType] = 1, [ColumnsA], 0 )
Then you could sum this unbound column to get the sum of everything in ColumnsA where LineType is 1.
3) You could use a CustomSummaryCalculator and do the calculations yourself.