Time for action – configuring our first Subreport

The steps for configuring our first Subreport are as follows:

  1. We will configure the size of the Sub-report in our report. Then we will open the Subreport and add and configure a bar chart. We go to the main Report and enlarge the area covered by the Sub-report object so that it fills the empty space as shown in the following screenshot:
    Time for action – configuring our first Subreport

    The size of the Sub-report in the main Report will be the available size that we have later in the Subreport.

  2. We go the Subreport SubReportBarChart and begin to design it. We can double-click on the Sub-report object we placed in the report or click on the tab that refers to this object.
  3. We add a chart object to the Report Header section and enlarge it so it looks like the following screenshot:
    Time for action – configuring our first Subreport

    Note

    We can see that to the left-hand side there is a kind of gray grid. This grid represents the area that we cannot use in the Subreport. The size of the gray grid depends on the size we have given the Sub-report object in the main Report and will help us to design our Subreport, as it tells us what area is visible and what is not.

  4. We configure the chart object, establishing the following:

    In the upper part, we choose the chart type bar chart as shown in the following screenshot:

    Time for action – configuring our first Subreport

    In the right-hand part we configure it as follows:

    • category-column = rating
    • value-columns = [sum_amount]
    • series-by-field = [rating]

    And in the left-hand part as follows:

    • bar-borders = True
    • x-axis-title = Ratings
    • y-axis-title = Amount
    • y-tick-fmt-str = $
    • show-item-labels = Show Labels
    • text-format = ${2}
    • show-legend = False

    Next, click on OK to continue.

    If we preview it, we will see the following:

    Time for action – configuring our first Subreport

What just happened?

By clicking on the different tabs, first we went to the main Report and enlarged the size of the Sub-report object. Then we went to the Subreport SubReportBarChart and began its design. We added a chart object to the Report Header section and configured it as indicated in the guide.

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

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