Chapter 10. Adding Subreports

This chapter is dedicated to Subreports. We will see what Subreports are and how they work and learn about their specific characteristics. We will also talk about the relation that exists between the main Report and its Subreports.

As we mix theory and practice, we will be able to appreciate the full potential of adding Subreports. We will be able to add information to our Reports in the form of tables, charts, and so on, whether this information is connected to our data set or not. This gives us an idea of the potential that Subreports provide.

In this chapter we will do the following:

  • Create a new report, create its data set, and create a Parameter.
  • Create two Subreports. The first Subreport will include a chart, and the second Subreport will include a table.
  • Configure internal Parameters for both Subreports.
  • Create data sets for both Subreports and configure them to use the values of the internal Parameters.
  • Finally, we propose that you modify a previous report, and add a Subreport so you can apply what you have learned in this chapter.

Starting practice

In this chapter we will create a new report and modify it step-by-step so the final product looks like the following screenshot:

Starting practice

The data set that will be defined in the report will only return data about a country and a city. This is why the bar chart that we have placed in our report is actually inside a Subreport. The same thing happens with the table, Top Ten Actors. This information is in another Subreport.

In the following section, we will learn the "hows" and "whys" of this.

Note

One clarification about terminology before we begin: when we refer to Subreports themselves, we will use the term "Subreport", and when we refer to the insertable object Starting practice, we will use the term "Sub-report".

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

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