Essa é uma revisão anterior do documento!


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


1. Double-click on the table component. The Field Editor will be displayed.

2. Right-click over the white space of the Field Editor and select the Add Fields… menu option. Add all of the fields listed.

3. Right-click over the white space of the Field Editor and select the New Field… menu option.

4. Type Wages in the Name Edit Box. Set the DataType to Currency. The Field Type should default to Calculated.

5 Click OK.

6. Repeat this process to create the following fields:

SSWages
MedicareWages
FederalTaxWithheld
SSTaxWithheld
MedicareTaxWithheld

7. Close the Field Editor. Select the table component.

8. Click on the Events tab of the Object Inspector.

9 Double-click in the OnCalcFields event. An event handler will be generated. Add the code as shown below.

Note: This event handler executes every time the record position of the customer table changes. Calculations placed in this event must always be intrarecord, which means that the values must be calculated from other values in the current record or must be hard-coded (as in this case).

10. Double-click the DBPipeline component to display the Field Editor.

11. Check to make sure that the calculated fields are listed. If they are not, then close the Field Editor; set the AutoCreateFields property to False in the Object Inspector, then set it back to True. Launch the Field Editor again and make sure the new fields are listed.

Note: Toggling the AutoCreateFields property for the DBPipeline will refresh the field list whenever you've changed the fields in the dataset.

12. Select Project | Compile rbFEProj from the Delphi main menu. Fix any compilation errors.

13. Select File | Save from the Delphi main menu.