コード例 #1
0
def _move_band_to_another_band(from_band, to_band, offset, beginning=False):
    if beginning is True:
        for child in to_band.getchildren():
            component_set_str(child, 'positionType', 'Float')
            set_y(child, get_y(child) + offset)
    for el in from_band.xpath("jr:*", namespaces=JRXML_NS):
        if beginning is False:
            component_set_str(el, 'positionType', 'Float')
            set_y(el, get_y(el) + offset)
        to_band.append(el)
コード例 #2
0
def _move_band_to_another_band(from_band, to_band, offset, beginning=False):
    if beginning is True:
        for child in to_band.getchildren():
            component_set_str(child, 'positionType', 'Float')
            set_y(child, get_y(child) + offset)
    for el in from_band.xpath("jr:*", namespaces=JRXML_NS):
        if beginning is False:
            component_set_str(el, 'positionType', 'Float')
            set_y(el, get_y(el) + offset)
        to_band.append(el)
コード例 #3
0
def _get_cell_contents(props):
    _validate_cell_contents(props)

    style = None
    cell_contents = etree.Element(JR + 'cellContents')
    for prop in props:
        frame = deepcopy(prop.getparent().getparent())
        set_x(frame, 0)
        set_y(frame, 0)

        report_element = frame[0]
        style = report_element.get('style', None)
        if style is not None:
            del report_element.attrib['style']

        cell_contents.append(frame)

    if style is not None:
        cell_contents.set('style', style)

    return cell_contents
def _get_cell_contents(props):
    _validate_cell_contents(props)

    style = None
    cell_contents = etree.Element(JR + 'cellContents')
    for prop in props:
        frame = deepcopy(prop.getparent().getparent())
        set_x(frame, 0)
        set_y(frame, 0)

        report_element = frame[0]
        style = report_element.get('style', None)
        if style is not None:
            del report_element.attrib['style']

        cell_contents.append(frame)

    if style is not None:
        cell_contents.set('style', style)

    return cell_contents