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

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.

主站蜘蛛池模板: 紫金县| 新河县| 镶黄旗| 明星| 南木林县| 延川县| 手游| 平原县| 牙克石市| 巴彦淖尔市| 昌都县| 新邵县| 涪陵区| 武鸣县| 安吉县| 宿松县| 临泽县| 墨竹工卡县| 西畴县| 酒泉市| 县级市| 于都县| 正蓝旗| 汉中市| 南康市| 万年县| 阜阳市| 苗栗县| 祁门县| 华容县| 无棣县| 福海县| 九龙县| 云林县| 秦皇岛市| 娄烦县| 城市| 仪征市| 芦溪县| 罗甸县| 武功县|