Using Render Events on Data Bands in Report Designer

Using Render Events on Data Bands in Report Designer

The articles in this section of the Knowledge Base involve working with Lists for display in your reports. To learn more about Lists and how to access the Report Designer, see Creating Lists in Report Designer. This article provides information on applying events to your data bands for use in your reports.

There are three special events that can be applied to a Data band, Rendering Event, Begin Render Event, and End Render Event. If there are ten rows in the Data Source to which the Data band has been assigned, then the Data band is printed ten times. The Begin Render Event is called before the data is rendered. It can be used to initialize some data as variables and calling some actions. The End Render Event is called after the data has been rendered when all data rows have been output. It is used for total calculation processing, amongst other things. The Rendering Event is called when rendering one data row. It is called before the Data band is printed. If there are ten rows in the Data Source, the Rendering Event is output ten times.

The following tutorial provides an example for working with these events:

  1. Create the “myvariable” variable in the Data Dictionary.
    1. Select the Page tab > select Panels > select Dictonary.

    2. Fig. 01 – Dictionary

    3. Select New Item > New Variable.

    4. Fig. 02 – New Variable

    5. From the New Variable window, create a new int type variable named “myvariable.” See Figure 03.

    6. Fig. 03 – New Variable Dialog

  2. Close the Dictionary Window > select the Data band for the event to be applied to > select the Events tab > write the following code in the Begin Render Event:
  3. myvariable = 0
  4. Add the following code to the Rendering Event:
  5. myvariable = myvariable + 1

    Fig. 04 – Render Events

    The End Render event is not used in this case.

    The myvariable variable that you added acts as a counter for the number of rows in the Data Source. Before the rendering starts, myvariable equals zero. Each subsequent row that is rendered from the Data Source adds one to myvariable, resulting in the total number of rows/items in the Data band.

  6. Enter the following expression into a text component where you want the myvariable value to be displayed:
  7. {myvariable}

    Fig. 05 – “myvariable” Text Component

    I added “Count:” to the beginning of the expression in Figure 04, for appearances.
  8. Set the Process at property of the Text Component to End of Report.

  9. Fig. 06 – “Process at” Property

  10. Process your report. Your results should look something like Figure 07.

  11. Fig. 07 - Report Example

    • Related Articles

    • Using Render Events on Group Header Bands in Report Designer

      The articles in this section of the Knowledge Base involve working with Groups for display in reports. To learn more about Groups and how to access the Report Designer, see Understanding Groups in the Report Designer. This article details Events in ...
    • Understanding Report Bands in Report Designer

      The articles in this section of the Knowledge Base involve working with Report Bands for display in your reports. To access the Report Designer, select Toolbox Setup > Design Reports > Design (Report Type) Report. Select New Report to design a report ...
    • Understanding Empty Data Bands in Report Designer

      The articles in this section of the Knowledge Base involve working with Empty Data bands for display in your reports. To access the Report Designer, select Toolbox Setup > Design Reports > Design (Report Type) Report. Select New Report to design a ...
    • Understanding Child Bands in Report Designer

      The articles in this section of the Knowledge Base involve working with Child Bands for display in your reports. To access the Report Designer, select Toolbox Setup > Design Reports > Design (Report Type) Report. Select New Report to design a report ...
    • Understanding Page Bands in Report Designer

      The articles in this section of the Knowledge Base involve working with Page Bands for display in your reports. To access the Report Designer, select Toolbox Setup > Design Reports > Design (Report Type) Report. Select New Report to design a report ...
    • Recent Articles

    • Toolbox Release Notes | Build 24.1.0430.641

      The following release notes apply to Toolbox build 24.1.0430.641. G-Code Path Fix An issue was discovered wherein G-code would sometimes not generate along the correct path, with files never being created in secondary folders, even in circumstances ...
    • Microvellum Foundation Library Release Notes | Build 24.0419

      Additions Added the new Blum SPACE STEP system. This can be activated within the “Toe Kick Assembly” construction option prompt in certain base & tall cabinet products. Added a new drawer system, the Harn Alunan T. Added 9 new Lamello Cabineo X ...
    • Toolbox Release Notes | Build 24.1.0416.641

      The following release notes apply to Toolbox build 24.1.0416.641. Maestro Toolfile Fix There was an issue with Maestro SCM Toolfiles reportedly experienced by some users, wherein the labels output by autolabeling would be in incorrect positions, an ...
    • Toolbox Release Notes | Build 24.1.0409.641

      The following release notes apply to Toolbox build 24.1.0409.641 Saw Delimited Processing Station Figure 1: The Saw Delimited option in a custom processing station. New options have been added to saw processing stations to allow for control over data ...
    • Toolbox Release Notes | Build 24.1.0328.641

      The following release notes apply to Toolbox Build 24.1.0328.641 Fillet Token Fixes Issues were discovered in the use of fillet tokens on products that also had the IRIB setting enabled: Some users processed work orders with rounded parts, which ...