Difference between revisions of "Report Template"

From PRS
Jump to navigation Jump to search
(Created page with "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 p...")
 
 
(13 intermediate revisions by 2 users not shown)
Line 2: Line 2:


== Creating a Report ==
== Creating a Report ==
 
[[File:Report Manager Button.png|thumb|310x310px|The button to open the Report Manager]]
To create a report, you will need the "Design Reports" [[Security Token]].
To create a report, you will need the "Design Reports" [[Security Tokens|Security Token]]. Then, simply navigate to any screen on PRS, and click "Setup -> Reports", 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.
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 ===
=== Fields ===
Line 18: Line 17:


=== Loading & Saving ===
=== 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 [[Kanban|Tasks]] and then import it for [[Job|Projects]], there will most likely be related errors. Hence, this is not recommended unless you know what you are doing.
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 [[Kanban|Tasks]] and then import it for [[Job|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 ==
== Report Design ==
TBC


== Generating Reports ==
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.
TBC
 
The other place that reports can be designed from is the preview window, brought up by clicking on the report in the ribbon (See [[#Printing Reports|Printing 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 [https://www.fast-report.com/en/ FastReport] engine and designer for its reporting system, and so details on how to use the report designer can be found on their [https://www.fast-report.com/public_download/docs/FRNet/online/en/UserManual/en-US/Fundamentals.html 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|Printing Reports]]), then this preview will use the data that was loaded when printing the report.
[[File:Choose data.png|thumb|Choose Report Data]]
 
=== 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 [[Employee|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 [[Task|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 [https://www.fast-report.com/public_download/docs/FRNet/online/en/UserManual/en-US/DataBand/MasterDetailRelations.html 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 (by closing and re-opening 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.
 
=== Using Data ===
[[File:Data window.png|thumb|216x216px|Data window]]
On the right-hand side of the designer is a "Data" window (if this is not present, click on "View -> Data"). From here you can get data to be displayed in the report. Expand the "Data Sources" menu and you will see a list of the tables you have loaded. Expand any one of them, and then you will see a collection of fields you can select from. To use a field, click and drag from this window over onto the report. For many types of data, this will automatically create a label filled with a placeholder that tells the report engine that you intend to use a data field here. (The syntax for this placeholder is the table name, followed by a dot, followed by the field name, and surrounded in square brackets - e.g., [Kanban.Title]
[[File:Data selection arrow.png|left|thumb|110x110px|Data selection arrow]]
Also, some data is automatically recognised as an image. For example, if you expand the "CompanyLogo" table, and drag the "Data" field onto the report, it will render as an image using the logo of your company (set in the [[Company Information]] screen). Additionally, dates are recognised as dates, and check boxes (such as the "Private" field for tasks) are rendered as check boxes.
 
The data fields can also be set by clicking the little arrow that appears in the top-right of report objects when hovering over them, as shown in the image. If you click on that, you can select a data field for the object (note that the associated data band must be set, see [https://www.fast-report.com/public_download/docs/FRNet/online/en/UserManual/en-US/DataBand/SimpleListReport/PrintDataRows.html the documentation]).
 
== 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|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".
 
== Emailing Reports ==
 
* If you have Email report templates set up, see [[Email Templates]], otherwise
*Ensure the email settings for your user account are filled in (Human Resources → User Accounts → Select User → Email Settings)
 
* Click the [[File:Email report.png|frameless]] button in the top left corner
* This will open up the default email app (you can select which one to use), along with a copy of the report as a PDF already attached

Latest revision as of 06:54, 29 March 2023

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[edit | edit source]

The button to open the Report Manager

To create a report, you will need the "Design Reports" Security Token. Then, simply navigate to any screen on PRS, and click "Setup -> Reports", 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[edit | edit source]

Name[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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 Printing 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[edit | edit source]

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.

Choose Report Data

Selecting Data[edit | edit source]

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 (by closing and re-opening 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.

Using Data[edit | edit source]

Data window

On the right-hand side of the designer is a "Data" window (if this is not present, click on "View -> Data"). From here you can get data to be displayed in the report. Expand the "Data Sources" menu and you will see a list of the tables you have loaded. Expand any one of them, and then you will see a collection of fields you can select from. To use a field, click and drag from this window over onto the report. For many types of data, this will automatically create a label filled with a placeholder that tells the report engine that you intend to use a data field here. (The syntax for this placeholder is the table name, followed by a dot, followed by the field name, and surrounded in square brackets - e.g., [Kanban.Title]

Data selection arrow

Also, some data is automatically recognised as an image. For example, if you expand the "CompanyLogo" table, and drag the "Data" field onto the report, it will render as an image using the logo of your company (set in the Company Information screen). Additionally, dates are recognised as dates, and check boxes (such as the "Private" field for tasks) are rendered as check boxes.

The data fields can also be set by clicking the little arrow that appears in the top-right of report objects when hovering over them, as shown in the image. If you click on that, you can select a data field for the object (note that the associated data band must be set, see the documentation).

Printing Reports[edit | edit source]

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".

Emailing Reports[edit | edit source]

  • If you have Email report templates set up, see Email Templates, otherwise
  • Ensure the email settings for your user account are filled in (Human Resources → User Accounts → Select User → Email Settings)
  • Click the Email report.png button in the top left corner
  • This will open up the default email app (you can select which one to use), along with a copy of the report as a PDF already attached