Essa é uma revisão anterior do documento!
Formatador de Relatório - ReportBuilder (Resumo do guia do desenvolvedor)
TUTORIAL DE RELATÓRIOS - B - C
1. Click in the white space of the group header band. The band should be selected in the Object Inspector.
2. Click on the Events tab of the Object Inspector and double-click on the BeforeGenerate event. Add the code shown below to the event handler.
Note: This routine retrieves the value of the recommendation field into a local string variable. It then assigns a color based on the value of the field. The color is stored in a private variable of the form so that all of the report event handlers can use it. The recommendation label in the group header band is set to the color. Finally, the recommendation label caption is set using the FirstPage property of the group. If FirstPage is False, then the group has overflowed onto an additional page.
3. Scroll up in the Code Editor and add the following code to the 'private' section of the form class declaration:
FRecommendationColor: TColor;
4. Select View | Toggle Form/Unit from the Delphi main menu.
5. Select the Standard tab of the Delphi Component palette.
6. Create a button on the form.
7. Configure the button:
Name btnPreview Caption Preview
8. Add the following code to the OnClick event for the button:
rbStock.Print;
9. Select File | Save from the Delphi main menu.
10. Run the project. The report should look like this: