CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing Report Headers and Footers
Pages: [1]

Author Topic: Customizing Report Headers and Footers  (Read 1008 times)

mbriney

  • I’m new here
  • *
  • Posts: 21
  • Karma: 2
  • Technical Product Manager / VP at Edelman
    • Edelman Public Relations
Customizing Report Headers and Footers
March 22, 2011, 11:11:15 am
When you create a new report in CiviCRM the default headers and footers are injected directly into the report.  These items are hard coded in the file

civicrm > CRM > Report > Form > Instance.php

I would like to allow you to customize the default options through a setting inside CiviCRM.  This would allow people to include logos or wrap reports in their own email template, provide custom help text, etc.

I was thinking of adding the items to either the Domain Information page or the Miscellaneous page under the Admin > Configure menu.  We would want this to be something that could be added back to core so everyone could use it.  Any opinions on what the best practices should be?

support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Customizing Report Headers and Footers
March 22, 2011, 11:20:55 am
how about extending the purpose of the headers/footers/automated messages tools currently used for civimail resources.

that might lend itself toward more advanced features, such as creating multiple report headers/footers that can be selected and used in a report (one of which is the default), rather than just prepopulating the text box.

on a related note --
i would love to see some rethinking with those elements. rather than have the html/body tags opened in the header and closed in the footer, i think they should be hardcoded. and the purpose of the header/footer be solely design/layout oriented (rather than to define the basic html structure). we would need to think through the use cases though.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Customizing Report Headers and Footers
March 22, 2011, 01:06:46 pm

Matt:

We should follow lcdweb's suggestion of re-using the table:

civicrm_mailing_component

We'll also have to either extend and/or deprecate the header / footer and get folks to reenter them in the new format

would be a good addition

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mbriney

  • I’m new here
  • *
  • Posts: 21
  • Karma: 2
  • Technical Product Manager / VP at Edelman
    • Edelman Public Relations
Re: Customizing Report Headers and Footers
March 22, 2011, 01:30:12 pm
I am thinking too that we might want to allow the user to customize different default headers for mailing and reports.  In our use case we would not want the default to be the same as our primary email template.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Customizing Report Headers and Footers
March 22, 2011, 03:16:07 pm

u can create a new type (its an enum) called ReportHeader and ReportFooter

and hence have a different default than mail header/footer

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing Report Headers and Footers

This forum was archived on 2017-11-26.