back to knowledgebase

Report templates and Export to PDF options

Updated: 17 May 2022 21:13:14 OpenCRM::Home OpenCRM::Settings OpenCRM::Settings::Templates

Export Options 

On the reports screen, all of the export options are grouped as shown below:

1. Additional Name

This will be appended to the report filename when it is exported

2. PDF Output

Select what data to output from the report when exporting to PDF:

  • Full: Everything on screen
  • Totals: Only export the total and record grouping information
  • Graph: Only export the graph
  • Grid: Only export the report data (result rows)
  • Grid & Graph: export the report data and graph (if there is one), but exclude total/grouping information
  • Totals & Graph : export the total and grouping information and graph (if there is one) but exclude the report data rows.

3. PDF Template

There is an additional option here to select the PDF template to use when exporting the report data. A default template is included but this template can be edited to suit your needs, or you can upload additional templates to suit your needs.

See below for more guidance on creating and editing these templates.

PDF Template Editing

PDF Templates can be edited by going to Settings > Communication Templates > PDF Templates

Existing templates can be seen under the Reports heading, and new ones can be added by hovering over the New Quote Template button and selecting New Report Template. Alternatively, it is possible to create a new template by duplicating an existing one.

It is possible to format the page around the report data as you like using the HTML editor. This is fully featured, so clickable links, images (e.g. company logos) and most HTML formatting and styling is supported.

A number of merge variables for company and user information can be included. The fields which are available are in the drop down at the top of the template editor.

"report_results" is the most important tag as this is the one which will be replaced with the output of the report!

User fields

If you choose the "Assigned" user fields, this will output with the details from the report owner. If you choose the fields from "My User Information", the output will merge with the details of the current logged in user. Please note that for scheduled reports, it is necessary to use the "assigned" user fields, because no user session is available to the scheduled reporting and so this information will be left blank or show details of the system user.

Formatting the output of the report

If you are familiar with CSS coding, it is possible to format each element of the form output. The default template contains CSS styling which can be used as a basis for this. 

Expand the HTML editor toolbar by clicking the icon on the far right and click Source to view/ edit the source html.

You can edit/insert CSS for your report in here. The following classes can be customised to change the various elements of the report:

.rptHead, - The column headings

.rptData, .The data rows

.rptTotal - The total row (record count)

.rptGrpHead, The heading for the report grouping section 

 

It is possible to change column widths of individal columns using the nth-child CSS selector. The below CSS is a good example of that - this will set a report output with 4 columns, to give each column the same width regardless of content.

.rptTable {
 table-layout: fixed;
 border-collapse: collapse;
}
.rptTitle, .rptHead, .rptData, .rptGrpHead, .rptGrp1Total, .rptGrp2Total, .rptTotal, .leftFormHeaderLeft { 
font-family: Verdana, Arial, Helvetica, Sans-serif;
font-size: 10px;
font-weight: bold;
height: 20px;
background: #ccc;
border:1px solid black;
}
.rptHead:nth-child(1){
width: 25%;
}
.rptHead:nth-child(2){
width: 25%;
}
.rptHead:nth-child(3){
width: 25%;
}
.rptHead:nth-child(4){
width: 25%;
}
.rptData {
background: #FFF;
font-weight: normal;
}
.rptGrp1Total {
background: #E3F4F4;
}
.rptGrp2Total {
background: #F1FBEC;
}
.rptTotal {
background: #d5d8e9;
border-bottom: 1px solid #000;
}
.rptEmptyGrp {
background: #FFF;
border-right: 1px solid #000;
}

Clickable links

Each row in the report will contain a clickable link which can be clicked on the PDF and will take you to that record in a web browser. Note that some PDF readers may disable the ability to follow hyperlinks by default. Refer to support documentation for the PDF reader you are using to find out how to disable that restriction.

Scheduled Reporting

In addition to the output from the reports screen, it is also possible on the scheduled reporting options to specify the PDF template to be used for any reports which are set up to be automatically emailed to your users or customers.

Rate This Article
  • 1 star
  • 2 star
  • 3 star
  • 4 star
  • 5 star
Feedback and Comments
captcha code  


You may also be interested in: