Customising Reports

The Sage CRM Blog

Articles of general interest about Sage CRM, the community, add-ons and general news!

Customising Reports

  • Comments 4
  • Likes

Following on from the Themes blog I wrote a while ago, 'Adding a new Theme to CRM', I'm going to show you some simple tricks that you can use to change the style of reports for your custom theme.

If we create a custom theme abcmotors as specified in the 'Adding a new Theme to CRM' blog, then we can modify the style sheets within the <CRM install name>\WWWRoot\Themes\Reports\abcmotors folder to produce a modified theme for our custom reports.

Reports use two different style sheets, StdPlain.css and StdGrids.css which relate to the Report Styles 'Standard without grids' and 'Standard with grids' respectively. Each theme will have a copy of each. For our purposes we can find the style sheets in <CRM install name>\ WWWRoot\Themes\Reports\abcmotors folder.

If I run the Company List by Segment report that comes standard with the Sage CRM v7.1 SP1 demo data install I get the following screen display

 

 

 

I want to customise this report based on my abcmotors theme. I want to align the Main report header to the centre instead of the left and I want the header text to be red. So I'll open the StdGrids.css and add text-align: centre and update the color tag to be red inside the TD.REPORTTITLE style:

TD.REPORTTITLE
{
  background: white;
  color: red;
  font-family: sans-serif;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}
 

 I'm going to change the table header background color to a blue color so I'll update the background tag to be #006699 inside the TD.REPORTCOLUMNHEADER style

TD.REPORTCOLUMNHEADER
{
  background: #006699;
  border-color: black;
  border-style: solid;
  border-width: 1px;
  color: white;
  font-family: Tahoma, Arial;
  font-size: 12px;
  font-weight: bold;
}
 

Save the StdGrids.css.  Open StdGridsPC.xsl and change the line <LINK REL="stylesheet" HREF="../Themes/Reports/color/StdGrids.css"/>  to   <LINK REL="stylesheet" HREF="../Themes/Reports/abcmotors/StdGrids.css"/>

Save the StdGridsPC.xsl

Also I want to change the logo on top of the reports. Simply substitute your new logo image for the Logo.jpg found in <CRM install name>\WWWRoot\Reports\. Make sure you backup the original Logo.jpg in case you want to revert back it again at a later stage.

Refresh metadata and clear out the browser cache.  When you run the report again it will look like this:

 

  

 

You can make as many modifications to the report style as you like so it corresponds to your main theme.

You would have to update the StdPlain.css and StdPlainPC.xsl accordingly if you are printing out reports using the 'Standard without grids' report style.

Enjoy.

Comments
  • Hi Andrew,

    This has been helpful - thank you.  The logo is written into the xsl file and I would like to be able to create a theme for some users that will access a different logo to the default logo that other users require.

    Is this something we can customise within the theme?

    Thanks Andrew.

    Kind regards,

    Penny

  • Hi Penrae

    If you want to have different logos for different users – you would have to create theme for each user – which would be quite tricky i'd imagine

    Themes are completely stateless, so they are not aware of users that uses them – so there is no obvious way of using two icons in the same theme, one for particular users and one for others.

    thanks

  • Hi Andrew,

    Not every single user but teams of users for each department for instance.  Sorry, I wasn't more clear.

    I think this can be done using the steps from your post previous ('Adding a new Theme to CRM') which I am giving it a go now.  The new theme will have the different logo for the reports.

    Cheers Andrew.

  • Hi Andrew

    Is there anyway to change the colour palett used by the report charts (CRM 7.0)? Our customer's corporate colours are very much blue going towards grey and they get a lot of orange, green and purple in their charts.

    Thanks

    Glen