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.

Quando você tem de excluir certos valores, de um total de grupo, adicionar um componente variável para a banda de rodapé de grupo. Acesse o diálogo Tempo e definir o 'Calculate On' para DataPipeline Traversal, selecione o pipeline de dados adequado, em seguida, defina 'Reset On' para o grupo Iniciar e selecione o grupo apropriado. Código do manipulador de eventos OnCalc como:

Este manipulador de eventos irá acumular o valor da variável apenas quando o valor pago é superior a US $ 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;