官术网_书友最值得收藏!

Time for action – creating a new report and creating a table based on data sets

We will create a new report, and later we will create a Table type data source and configure its columns and data types. Finally, we will populate the table with the example data.

  1. Start PRD if it is not yet running.
  2. Create a new report. Remember that there are different ways to create a new report as follows:
    • Choose the New Report option in the Welcome window
    • Click on the following icon in the shortcuts bar:
    • Navigate to File | New
    • Press Ctrl + N
  3. Save the report as 01_Hello_World.prpt using the following icon:
  4. We will define Table as a data source. The Table is a static data source; it is stored with the report's metadata and remains constant. This type of data source is often used for demonstrations, examples, testing, prototyping, and so on.
  5. In the Data tab, right-click on Data Sets and choose Table.
  6. We define three columns in our data sets: Zones, Products, and Quantity.
  7. To create the table, click on the Time for action – creating a new report and creating a table based on data sets icon. By default, this will create a query with the name set as Query 1 and with two columns ID and Value. We will do the following:
    1. We will change the query's name to ZoneProductQty.
    2. We click on the heading of the ID column and press on the Time for action – creating a new report and creating a table based on data sets button to eliminate it.
    3. We repeat this process now for the heading of the Value column.
    4. We press on the Time for action – creating a new report and creating a table based on data sets button to add a new column. Next, we double-click on the heading of this column to modify it. We give it the name Zones and then click on the Time for action – creating a new report and creating a table based on data sets button and choose class.java.lang.String as Zones will have a String type data.
    5. We follow the same steps to create another column with the name Products using the String data type (class.java.lang.String).
    6. We follow the same steps to create another column with the name Quantity using the Integer data type (class.java.lang.Integer).
    7. After following these steps, we will obtain a result like this:
  8. Next, we will populate the table with data.
  9. To do so, we press on the Time for action – creating a new report and creating a table based on data sets button and fill in the values that correspond to each column. Each time we have to create a new row, we press on the Time for action – creating a new report and creating a table based on data sets button. We need to populate the table with the data that is shown in the following screenshot:
    Note

    Another way of populating the table with data is by pressing the Import Spreadsheet button. With this option, we can extract data from a spreadsheet.

  10. Press OK to save the changes and return to the previous screen. Now we can see how our new data source turned out in the following screenshot:

What just happened?

Initially we created a new report, and then we created a data set of the type Table. We added three columns (Zones, Products, and Quantity) to the table and defined its data types. Finally, we populated the table with some example data.

主站蜘蛛池模板: 山阳县| 永年县| 同德县| 神木县| 宁化县| 安图县| 乌拉特中旗| 刚察县| 车险| 德钦县| 习水县| 溆浦县| 海淀区| 马关县| 洛宁县| 巴彦淖尔市| 子洲县| 陇川县| 姜堰市| 陇川县| 洞头县| 尼勒克县| 靖西县| 屯门区| 漳浦县| 清新县| 广水市| 盘锦市| 东兰县| 丁青县| 温州市| 合江县| 五家渠市| 明溪县| 白山市| 丰城市| 东莞市| 兴安县| 论坛| 潼南县| 旬邑县|