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 !
Ok I finaly arrive to use the formula "Sum([ColumnsA(0)])" with the UltraCalcManager but the result is not what a was looking for. The actual result summarize only the first row of the Band root of the entire grid.
root LineType ColumnsA ColumnsB
1 10 20
2 5 11
root 1 7 5
2 15 8
Total 17 25 <== (This is what i would like to have as a result)
Actualy I have 10 20 <== (This is what i have as a result)
The total summarize only the first row of the root band but of the first row of the grid only
My goal is to summarize all values of the root band where linetype=1
Is that possible?
Thanks in advance
yannh said:Do I have to use the UltraCalcManager?
Yes, you have to have an UltraCalcManager in order to use Formulas.
The error message you have listed here don't make any sense. A "Key Already Exists" message indicates that you are attempting to add an item to a collection with a key that already exists in the collection. So you need to find out what you are adding and make sure it has a unique key.
The circularity error means that you have two formulas that point to each other in an infinite loop.
Hi again,
I try your suggestion but no total appears in the summary row.
May be there is something wrong or that i dont understand.
The first scenario is when I use the formula with out the UltraCalcManager
Dim strFormula As String
gridGestionProjetExecution.DisplayLayout.Bands(BAND_NAME_ROOT).Summaries.Add(i.ToString, SummaryType.Formula, gridGestionProjetExecution.DisplayLayout.Bands(BAND_NAME_ROOT).Columns(i.ToString), SummaryPosition.UseSummaryPositionColumn)
gridGestionProjetExecution.DisplayLayout.Bands(BAND_NAME_ROOT).Summaries(i.ToString).SummaryDisplayArea = SummaryDisplayAreas.BottomFixed
gridGestionProjetExecution.DisplayLayout.Bands(BAND_NAME_ROOT).Summaries(i.ToString).DisplayFormat = "{0}"
gridGestionProjetExecution.DisplayLayout.Bands(BAND_NAME_ROOT).Summaries(i.ToString).Appearance.TextHAlign = HAlign.Right
' Here I tried those 4 combination of syntax and nothing appears in the summary row
'strFormula = "[\\gridGestionProjetExecution\" + BAND_NAME_ROOT + "(0)\" + i.ToString & "]"
'strFormula = "[//gridGestionProjetExecution/" + BAND_NAME_ROOT + "(0)/" + i.ToString & "]"
'strFormula = "[//gridGestionProjetExecution/" + BAND_NAME_ROOT + "/" + i.ToString & "(0)]"
strFormula = "[\\gridGestionProjetExecution\" + BAND_NAME_ROOT + "\" + i.ToString & "(0)]"
gridGestionProjetExecution.DisplayLayout.Bands(BAND_NAME_ROOT).Summaries(i.ToString).Formula = strFormula
Next
The second Scenario is with the UltraCalcManager
e.Layout.ViewStyle = ViewStyle.MultiBand
e.Layout.Grid.CalcManager = calcManager
' Here I tried those 4 combination of syntax and I received thoses error messages
Error Message with this syntax : "Key Already Exist"
'e.Layout.Bands(BAND_NAME_ROOT).Columns(i.ToString).Formula = "[\\gridGestionProjetExecution\" + BAND_NAME_ROOT + "(0)\" + i.ToString + "]"
'e.Layout.Bands(BAND_NAME_ROOT).Columns(i.ToString).Formula = "[\\gridGestionProjetExecution\" + BAND_NAME_ROOT + "\" + i.ToString + "(0)]"
'e.Layout.Bands(BAND_NAME_ROOT).Columns(i.ToString).Formula = "[\\gridGestionProjetExecution\" + BAND_NAME_ROOT + "\" + i.ToString + "]"
Error Message with this syntax : "A formula Circularity has been detected in the formulaNo calculations can be performes by the CalcEngine while a Circularity exists"
e.Layout.Bands(BAND_NAME_ROOT).Summaries.Add("Summary1", "sum( [" + i.ToString + "] )")
Do you have an idea of the problem ?
Do I have to use the UltraCalcManager?
Okay... I am pretty sure you can do this. I forget the synatax, exactly, but try this:
"[ColumnsA(0)]"
or maybe:
"[\\gridName\Band Name(0)\ColumnsA]"
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
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! :)