Essa é uma revisão anterior do documento!


Formatador de Relatório - ReportBuilder (Resumo do guia do desenvolvedor)


When you need to exclude certain values from a group total, add a Variable component to the group footer band. Access the Timing dialog and set the 'Calculate On' to DataPipeline Traversal, select the appropriate Data Pipeline, then set 'Reset On' to Group Start and select the appropriate group. Code the OnCalc event handler as:

This event handler will accumulate the value of the variable only when the amount paid is greater than $5,000.

procedure TForm1.ppVariable1Calc(Sender: TObject; var Value: Variant);
var
  lcValue: Currency;
begin
  lcValue := Table2.FieldByName('AmountPaid').AsCurrency;
  if (lcValue >= 5000) then
    Value := Value + lcValue;
end;