Difference between revisions of "Report Template"
Line 22: | Line 22: | ||
== Report Design == | == Report Design == | ||
Reports can be designed from two places in PRS - first, from the Report Manager, where you create new reports (See [[Creating | Reports can be designed from two places in PRS - first, from the Report Manager, where you create new reports (See [[#Creating a Report|Creating a Report]]). On the right hand-side of this grid, there is a pencil icon, which, if clicked, brings up the report designer. | ||
The other place that reports can be designed from is the preview window, brought up by clicking on the report in the ribbon (See [[Generating Reports]]). From the preview window, click the pencil icon in the top right, and this opens the designer. If designed this way, there is also data pre-loaded into the report, since you have previewed the report. This means that you can design the report and then preview with data already loaded, assisting you to design based on how the end product will look with data. | The other place that reports can be designed from is the preview window, brought up by clicking on the report in the ribbon (See [[Generating Reports]]). From the preview window, click the pencil icon in the top right, and this opens the designer. If designed this way, there is also data pre-loaded into the report, since you have previewed the report. This means that you can design the report and then preview with data already loaded, assisting you to design based on how the end product will look with data. |
Revision as of 01:38, 16 December 2022
The Report Template system gives the ability to generate reports based on the data with PRS, assisting in displaying and reporting on whatever is required. All main panels within PRS allow for reports, and each can have as many reports as is required.
Creating a Report
To create a report, you will need the "Design Reports" Security Token. Then, simply navigate to any screen on PRS, and click the little arrow in the ribbon bar at the top, as displayed in the picture. This will open up a new grid, from which you can create new report templates. Each report template in this grid acts as a "template" for the report; it tells PRS how to display the data. To create a new report, simply click the "+" button down the bottom, and fill in the required fields.
Fields
Name
The name is the name of the report, displayed in the main ribbon of PRS. It should be descriptive about what data the report displays.
Visible
Determines whether the report should be visible in PRS. If this is not checked, there will be no way to generate the report. This should be used when you have old reports that are no longer necessary, but you don't want to delete them in case you need them again, or, if you are currently working on a report's design and don't want it to be visible yet.
All Records / Selected Records
These fields determine what data should be used in the report. Most panels in PRS have a way to select data, and these fields determine whether all data in PRS should be used, or just the records that have been selected. If neither are selected, the report will not be able to be generated. If both are selected, there will be an option to choose which one when generating the report later on.
Loading & Saving
On the left hand side of the report grid, there are two buttons for loading and saving reports from/to files. This allows you to take a report template and reload it somewhere else. Note that this is prone to errors, since a report is intrinsically tied to the type of data that is being loaded; hence, if you export a report for Tasks and then import it for Projects, there will most likely be errors, since the data that represents a Job is different from that of a Task. Hence, this is not recommended unless you know what you are doing.
Report Design
Reports can be designed from two places in PRS - first, from the Report Manager, where you create new reports (See Creating a Report). On the right hand-side of this grid, there is a pencil icon, which, if clicked, brings up the report designer.
The other place that reports can be designed from is the preview window, brought up by clicking on the report in the ribbon (See Generating Reports). From the preview window, click the pencil icon in the top right, and this opens the designer. If designed this way, there is also data pre-loaded into the report, since you have previewed the report. This means that you can design the report and then preview with data already loaded, assisting you to design based on how the end product will look with data.
PRS uses the FastReport engine and designer for its reporting system, and so details on how to use the report designer can be found on their online documentation. That being said, there are several important points that can be mentioned here as well.
Previewing
The report can be previewed from the designer. Click on "File -> Preview..." This will preview the current report as you've designed it. Note that this does not save the report, so don't forget to return to the designer and hit the save button to ensure your changes are committed. Also, if you loaded the report from the PRS ribbon, instead of the report manager (see Printing Reports), then this preview will use the data that was loaded when printing the report.
Selecting Data
The data to be loaded into the report comes in the form of tables; each table corresponds to a specific "type" of data. An "Employee" table will contain data for Employees, and an "Equipment" table contains data about Equipment. A few of the table names are slightly different than what they might appear in PRS, e.g. the table for Tasks is named "Kanban". So when you want to generate a report on your tasks, the data you will need will be in the "Kanban" table.
Each table has a number of columns which map to the individual properties of an object, so "Kanban" has columns for its "Number", its "Title", and many others. Each row of the table is a specific object.
It is important to tell PRS what data you need - there exists a vast number of tables that PRS knows how to load, but you will not want PRS to load all this data, since that can take a while. To choose the data you want to report on, navigate to "Data -> Choose Report Data...". This will bring up a menu from which you can select a number of tables to load data for. Several of these are loaded by default, such as the "CompanyInformation" table, "CompanyLogo" table and the table related to the specific data - generating a report for tasks will automatically load the "Kanban" table. Other tables that can be loaded (but are not by default) are those that are related to the main object. So, since tasks can have associated equipment items, there is also a "Kanban_Equipment" table. The "Kanban_" prefix represents the fact that this is, in a way, a "child table" of "Kanban" - there is a link between the tables. The report designer knows about these relationships between the tables, so the associated relationships can be modelled using the report designer's concepts of Detail Bands (see the documentation). In order to tell PRS to also load the equipment associated with the tasks, check the little box next to "Kanban_Equipment", so that it displays a tick. Then, next time you preview the report, PRS will also load the data required.
Note that the "Kanban_Equipment" table does not load every piece of equipment in PRS - it only loads the equipment items that are related to the tasks that you selected - if only one task was selected to generate the report, then the "Kanban_Equipment" table will have at most one equipment item, since only one piece of equipment is able to be attached to a task.
You can also select particular columns from the data selection window, but at this stage this does not cause less data to be loaded - it just prevents it being displayed in the various windows in the report designer and thus removes from view unnecessary fields that clutter up the screen.
Printing Reports
Once you have created and designed a report, it is now ready to be generated/printed. In PRS, navigate to the panel where you created the report, and, if the report was set to Visible, it will now appear in the bar at the top. This will be visible to anyone with the "Print Reports" Security Token, and by clicking on the report, the relevant data will be assembled, and the report generated from the data.
Generating the report will open the report preview window, from which you view, print, or save to PDF. Additionally, if you have the "Design Reports" Security Token, then there will also be a pencil icon, which you can click to edit the report in the designer, allowing for a quick backwards and forwards between the design and preview modes. Additionally, since generating the report allows means there is now data to print from, it is often easier to design a report by first printing it to give it some data to work with, and then designing from the preview window, allowing you to see the changes that you make by clicking "Preview".