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

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.

主站蜘蛛池模板: 繁峙县| 宝山区| 苍梧县| 永济市| 彭泽县| 青川县| 鲁甸县| 丹寨县| 奉化市| 六安市| 彰武县| 昔阳县| 桃园市| 潞城市| 云南省| 衡水市| 安阳市| 两当县| 金华市| 德令哈市| 江山市| 辰溪县| 桐梓县| 元氏县| 竹山县| 镇坪县| 乐东| 文水县| 霍州市| 英吉沙县| 新津县| 定结县| 鄂托克旗| 永德县| 泸州市| 莲花县| 江山市| 繁昌县| 阳泉市| 三台县| 鱼台县|