'Constructor
@param resource: the resource
@param title: the report title
@param data: the JSON data (as dict)
@param aggregate: the aggregation functions as list of tuples
(method, colname)
@param field_types: the field types as dict {colname: type}
@param group_headers: render group header rows
@param totals_label: the label for the aggregated rows
(default: "Total")
@param pdf_header: callable or static HTML to use as
document header, function(r, title=title)
@param pdf_footer: callable or static HTML to use as
document footer, function(r)'

def __init__(self, resource, title=None, data=None, aggregate=None, field_types=None, group_headers=False, totals_label=None, pdf_header=DEFAULT, pdf_footer=None):

    self.resource = resource
    self.title = title
    self.data = data
    self.aggregate = aggregate
    self.field_types = field_types
    self.totals_label = totals_label
    self.group_headers = group_headers
    if (pdf_header is DEFAULT):
        self.pdf_header = self._pdf_header
    else:
        self.pdf_header = pdf_header
    self.pdf_footer = pdf_footer
