Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2702

Summary: Bug on the apply button of a Summary
Product: FireMonkey TeeChart Reporter: yeray alonso <yeray>
Component: EditorsAssignee: yeray alonso <yeray>
Status: RESOLVED FIXED    
Severity: enhancement CC: yeray
Priority: ---    
Version: 40.240410   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: https://www.steema.com/support/viewtopic.php?f=17&t=18142#p80519
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2024-05-06 05:58:56 EDT
From the customer:

Bug on the apply button of a Summary, after having set the field and clicked on apply, if I change the field the apply remains disabled, to resolve it you need to change the Calculate (The apply button instead works correctly in the case of DataSource/Dataset).

See the screenshot from the customer:

https://www.steema.com/support/download/file.php?id=8975

An example, using a button to open the editor.
Use it to select "Summary" as the DataSource.
Select "MyTable" as the Dataset, and "Calculate" "Sum" of "Increasing".
Press "Apply".
Change the "of" filed to "Decreasing".
Note you can't press the "Apply" button.

uses Chart, DBChart, Editor.Chart, Editor.DBChart, Series, Engine,
FireDAC.Comp.Client, Data.DB;

var BarChart: TDBChart;
var MemTable1: TFDMemTable;

procedure TForm1.EditBarButtonClick(Sender: TObject);
begin
  TChartEditForm.Edit(Self, BarChart);
end;

procedure TForm1.FormCreate(Sender: TObject);
var val: double;
    i: Integer;
begin
  MemTable1:=TFDMemTable.Create(Self);
  with MemTable1 do
  begin
    Name:='MyTable';

    FieldDefs.Add('Increasing', ftInteger);
    FieldDefs.Add('Decreasing', ftInteger);

    CreateDataSet;
    Open;

    AppendRecord([10, 100]);
    AppendRecord([20, 90]);
    AppendRecord([30, 80]);
    AppendRecord([40, 70]);
  end;

  BarChart:=TDBChart.Create(Self);

  with BarChart do
  begin
    Parent:=Self;
    Align:=TAlignLayout.Client;
    Color:=TAlphaColors.White;
    Gradient.Visible:=False;
    Walls.Back.Color:=TAlphaColors.White;
    Walls.Back.Gradient.Visible:=False;
    Legend.Hide;

    with AddSeries(TBarSeries) do
    begin
      Marks.Hide;
      ColorEachPoint:=True;
    end;
  end;
end;