Essa é uma revisão anterior do documento!


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


To exclude certain values from a grand total, add a Variable component to the summary band. Then code the OnCalc event handler as:

Para excluir determinados valores de um total geral, adicionar um componente variável para a banda de resumo. Em seguida, codificar o manipulador de eventos OnCalc como:

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

This event handler will accumulate the value of the variable only when the amount paid is greater than $5,000. The screen shot below shows the result. Notice that this report also has a conditional group total in the group footer band.

Este manipulador de eventos irá acumular o valor da variável apenas quando o valor pago é superior a US $ 5.000. A captura de tela abaixo mostra o resultado. Note-se que este relatório também tem um total grupo condicional na banda de rodapé de grupo.