Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá pessoal,
Alguém pode me dizer o que está faltando neste código? Pois está dando erro na linha em vermelho.
Estou usando Delphi 7 e o componente é DevExpress.
>
procedure TFrmScriptSQL.SpeedButton1Click(Sender: TObject);
Var
GridColumn : TdxDBTreeListColumn;
SummaryItems : TdxDBGridSummaryItems;
NewSummaryItem : TdxDBGridSummaryItem;
I : Integer;
begin
I:=ListBox2.ItemIndex;
if not dxDBGrid3.IsGridMode then
begin
GridColumn := dxDBGrid3.ColumnByName('dxDBGrid1Event_Date');
**if GridColumn.SummaryGroup <> nil then**
begin
SummaryItems := GridColumn.SummaryGroup.SummaryItems;
NewSummaryItem := SummaryItems.Add;
NewSummaryItem.ColumnName := '_dxColumna' + IntToStr(ListBox2.ItemIndex);
NewSummaryItem.SummaryField := ListBox2.Items.Strings*;*
NewSummaryItem.SummaryFormat := TxtFormato1.Text;
If rgCabecalho.ItemIndex = 0 Then
NewSummaryItem.SummaryType := cstNone
Else
If rgCabecalho.ItemIndex = 1 Then
NewSummaryItem.SummaryType := cstSum
Else
If rgCabecalho.ItemIndex = 2 Then
NewSummaryItem.SummaryType := cstMin
Else
If rgCabecalho.ItemIndex = 2 Then
NewSummaryItem.SummaryType := cstMax
Else
If rgCabecalho.ItemIndex = 3 Then
NewSummaryItem.SummaryType := cstMax
Else
If rgCabecalho.ItemIndex = 4 Then
NewSummaryItem.SummaryType := cstCount
Else
If rgCabecalho.ItemIndex = 4 Then
NewSummaryItem.SummaryType := cstAvg;
dxDBGrid1.RefreshGroupColumns;
end;
end;
dxDBGrid3.ShowSummaryFooter;
end;
Grato,
Ilano.
Carregando comentários...