Пример #1
0
def process_blank_page(report):
    """
    Re-initialize report_info and output blank page.
    :param report: dictionary holding report information
    """
    # create_canvas(report, report['output_filename'])    # clear report_info
    create_canvas(report)  # clear report_info
Пример #2
0
def summary_band(report, element):
    """
    Process jrxml 'summmary' element.
    :param report: dictionary holding report information
    :param element: current jrxml element being processes.
    """
    if report.get('canvas') is None:
        create_canvas(report)
    report['printingFooter'] = True
    process_band_element(report, element)
Пример #3
0
def process_title_band(report, element=None):
    """
    Process title element.
    :param report: dictionary holding report information
    :param element: current jrxml element being processes.
    """
    if not report['output_to_canvas']:
        if report.get('canvas') is None:
            create_canvas(report)
        process_band_element(report, element)
Пример #4
0
def process_groupFooter(report, element):
    """
    Process groupFooter element.
    :param report: dictionary holding report information
    :param element: current jrxml element being processes.
    """
    if element is not None:
        if report.get('canvas') is None:
            create_canvas(report)
        process_band_element(report, element)
Пример #5
0
def check_for_new_page(report):
    if report.get('canvas') is None:
        create_canvas(report)
        if report.get('title') is not None:
            report_elements_dict['title'](report,
                                          report['title'][0].get('title'))
        if report.get('pageHeader') is not None:
            report_elements_dict['pageHeader'](
                report, report['pageHeader'][0].get('pageHeader'))
        if report.get('columnHeader') is not None:
            report_elements_dict['columnHeader'](
                report, report['columnHeader'][0].get('columnHeader'))
Пример #6
0
def process_no_data_section(report):
    """
    Re-initialize report_info and output 'No Data' band only.
    :param report: dictionary holding report information
    """
    # create_canvas(report, report['output_filename'])    # clear report_info
    create_canvas(report)  # clear report_info

    report['cur_y'] = report['pageHeight'] - report['topMargin']
    if report.get(
            'noData') is not None:  # print noData band if defined in layout
        report_elements_dict['noData'](report,
                                       report['noData'][0].get('noData'))
Пример #7
0
def page_footer_band(report, element=None):
    """
    Process jrxml 'pageFooter' element.
    :param report: dictionary holding report information
    :param element: parent element of jrxml 'pageFooter' element
    """
    if element is None:
        page_footer = report.get('pageFooter')
        if page_footer is not None:
            element = report['pageFooter'][0]['pageFooter']
    if report.get('canvas') is None:
        create_canvas(report)
    report['printingFooter'] = True
    process_band_element(report, element)
Пример #8
0
def column_footer_band(report, element=None):
    """
    Process columnFooter element.
    :param report: dictionary holding report information
    :param element: current jrxml element being processes.
    :return:
    """
    if element is None:
        column_footer = report.get('columnFooter')
        if column_footer is not None:
            element = report['columnFooter'][0]['columnFooter']
    if report.get('canvas') is None:
        create_canvas(report)
    report['printingFooter'] = True
    process_band_element(report, element)
Пример #9
0
def column_header_band(report, element=None, force=False):
    """
    Process columnHeader element.
    :param report: dictionary holding report information
    :param element: current jrxml element being processes.
    :param force: True if unconditionally output, False if only output if nothing is yet output to canvas
    """
    if not report['output_to_canvas'] or force:
        if element is None:
            column_header = report.get('columnHeader')
            if column_header is not None:
                element = report['columnHeader'][0]['columnHeader']
        if report.get('canvas') is None:
            create_canvas(report)
        process_band_element(report, element)
Пример #10
0
def process_no_data(report, element):
    if report.get('canvas') is None:
        create_canvas(report)
    report['printingFooter'] = True
    process_band_element(report, element)