How to customize reports through CSS in PDF format

1 minute read time.

Today I'm going to present a simple trick "How to customize reports through CSS in PDF format".

But first of all, all files mentioned in this article have to be backed-up before editing.

When run a report we can choose 3 modes:

  • Screen (HTML)
  • Export to PDF
  • Excel to XLSX/Excel CSV/CSV

This covers the settings that control the look and feel of a report when we select "Export to PDF".

Below I present part of the theme file ergonomic.css with reports themes which can be found in the following directory:

C:\Program Files (x86)\Sage\CRM\[instancename]\WWWRoot\Themes

Below this code I'll present a screen shot which will show which property is used for which part of the report.

If we want our changes to take affect we have to restart IIS.

COLUMN_HEADER_STYLE=background-color='#B3B3B3' border-color='black' border-style='solid' border-width='1px' color='white' font-size='8px' font-weight='bold' padding-left='1px' padding-right='1px'
DETAIL_STYLE=border-color='black' border-style='solid' border-width='1px' color='black' font-size='8px' padding-left='1px' padding-right='1px' text-decoration='none' vertical-align='top'
GROUP_HEADER_STYLE=border-color='black' border-style='solid' border-width='1px' color='black' font-size='8px' font-weight='bold' padding-left='1px' padding-right='1px' text-decoration='none' vertical-align='top'
GROUP_FOOTER_STYLE=background-color='white' border-color='black' border-style='solid' border-width='1px' color='grey' font-size='8px' font-weight='bold' padding-left='1px' padding-right='1px'
HEADER_FOOTER_STYLE=background-color='white' color='grey' font-size='6px'
SUMMARY_STYLE=background-color='white' border-color='black' border-style='solid' border-width='1px' color='grey' font-size='10px' font-weight='bold' padding-left='1px' padding-right='1px'
TITLE_STYLE=background-color='white' color='black' font-size='16px' font-weight='bold'
CAPTION_STYLE=font-size='11px' font-weight='bold' color='black'