Time for action – modifying the header and detail

Next, we will modify our report's layout. We will delete the old objects from the Report Header section and the Details Header section, hide the Page Header section and enable the Group Header section of our report. Then, we will add three new labels (Country, Customer, and Amount) and modify the data to be shown on the Details section. Also, we will configure the behavior of Details Header.

  1. We should now delete every label (Time for action – modifying the header and detail) as well as the horizontal-line (Time for action – modifying the header and detail) from the Report Header section and the Details Header section.
  2. Then we will go to Report tree structure (Structure tab) and search the tree for the following node: Master Report | Group | Group Header. We will select this node and modify Attributes.hide-on-canvas to false.

    This modification will enable the visualization of the Group Header in the Work Area.

  3. Then we will go to Report tree structure (Structure tab) and search the tree for the following node: Master Report | Group | Details Body | Details Header. We will select this node and modify its behavior:
    • Style.repeat-header: true

    This modification will make this section present on every page.

    Note

    In all sections of our report we can configure its behavior (Style, category page-behavior). For example, Style.pagebreak-before and Style.pagebreak-after are used to add a page break before or after the section is presented in the report.

  4. Now we will delete the image (Time for action – modifying the header and detail) from the Page Header section.
  5. Go to Report tree structure (Structure tab) and search the tree for the following node: Master Report | Page Header. Select this node and perform the following change:
    • Attributes.hide-on-canvas: true

    This modification will hide the Page Header section from the UI.

  6. We will now add a new label in the Details Header section, and configure the following values:
    • Attributes.value: Adding Relational Data Source
    • Style.font-size: 18
    • Style.bold: true
  7. We will now add three labels to the Details Header section and modify their text so that they look like the ones shown in the following screenshot:
    Time for action – modifying the header and detail

    To modify the text of the labels we should change the value present in Attributes.value for every label. We will also style these labels a little bit by changing the following fields:

    • Style.font-size: 12
    • Style.bold: true

    Note

    PRD allows for multiple objects to be selected simultaneously and then change their Attributes and Styles in a single action.

    To select multiple objects at the same time we can use the Time for action – modifying the header and detail option available on the Shortcuts menu of the UI.

    Now, we need to draw a line beneath the three labels so that it looks like this:

    Time for action – modifying the header and detail

    But this time we will not add a horizontal-line object. What we will do is set the bottom border of the Details Header section. We will go to Report tree structure (Structure tab), select the node Master Report | Group | Details Body | Details Header and set the following:

    • Style.bottom-style: solid
    • Style.bottom-size: 4.0
    • Style.bottom-color: #009933
  8. Now delete the text-field (Time for action – modifying the header and detail) and number-field (Time for action – modifying the header and detail) objects available on the Details section and add to this very section a text-field object, as well as a Message (Time for action – modifying the header and detail) and a number-field:
    Time for action – modifying the header and detail
  9. On the Message and number-field objects, we will configure the Style.h-align to have a value CENTER, so that the text on them is horizontally centered on display. Now, we will modify the values of these three objects so that they show the data from our CountryCustomerAmount data set.
    • In the first object (text-field) we will modify Attributes.field and select the value country.
    • In the second object (Message) we will modify Attributes.value with the following: $(first_name), $(last_name).
    • In the third object (number-field) we will modify Attributes.field and select the value sum_amount.

The Details section of our report should look like the following:

Time for action – modifying the header and detail

To visualize what our reports are looking like we can use the Preview option.

What just happened?

We deleted the labels and horizontal-line, which were present on the Report Header and Details Header sections of our report. We hid the Page Header section, and then enabled the Group Header section. We configured the Details Header section to be repeated on every page. We also added and styled three new labels to the mentioned section: Country, Customer, and Amount. We then deleted the old objects present in the Details section and added three new objects: text-field, Message, and number-field. Finally, we modified these objects to contain information coming from our CountryCustomerAmount data set.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset