Пример #1
0
 class band_page_header(ReportBand):
     height = 1.5 * cm
     elements = [
         Image(left=0.4 * cm,
               top=0,
               width=4 * cm,
               height=5.12 * cm,
               filename=os.path.join(RUTA_PROYECTO,
                                     '../control/escom.gif')),
         SystemField(expression='%(report_title)s',
                     top=0.1 * cm,
                     left=0,
                     width=BAND_WIDTH,
                     style={
                         'fontName': 'Helvetica-Bold',
                         'fontSize': 21,
                         'alignment': TA_CENTER
                     }),
         Label(text="Escuela Superior de Cómputo",
               top=0.8 * cm,
               left=0,
               width=BAND_WIDTH,
               style={
                   'fontName': 'Helvetica-Bold',
                   'fontSize': 16,
                   'alignment': TA_CENTER
               }),
         SystemField(expression=u'Pagina %(page_number)d de %(page_count)d',
                     top=0.1 * cm,
                     width=BAND_WIDTH,
                     style={'alignment': TA_RIGHT}),
     ]
     borders = {'bottom': Line(stroke_width=5)}
Пример #2
0
 class band_page_header(ReportBand):
     height = 2.0 * cm
     elements = [
         SystemField(expression='%(report_title)s',
                     top=0.5 * cm,
                     left=0,
                     width=BAND_WIDTH,
                     style={
                         'fontName': 'Helvetica-Bold',
                         'fontSize': 14,
                         'alignment': TA_CENTER
                     }),
         Label(text=_('User ID'), top=1.5 * cm, left=0.5 * cm),
         Label(text=_('Real Name'), top=1.5 * cm, left=6 * cm),
         Label(text=_('Last access'), top=1.5 * cm, left=15 * cm),
         SystemField(expression=_('Page %(page_number)d of %(page_count)d'),
                     top=0.1 * cm,
                     width=BAND_WIDTH,
                     style={'alignment': TA_RIGHT}),
         Image(filename=stock.getStockImagePath(stock.LOGO),
               left=0.1 * cm,
               top=0.0 * cm,
               width=2 * cm,
               height=2 * cm),
     ]
     borders = {'bottom': True}
Пример #3
0
    def __init__(self):
        super(RemetenteRetrato, self).__init__()
        self.elements = []

        # Quadro do emitente
        self.inclui_texto(nome='quadro_emitente', titulo='', texto='', top=0*cm, left=0*cm, width=8*cm, height=4*cm)

        #
        # Área central - Dados do DANFE
        #
        lbl, txt = self.inclui_texto(nome='danfe', titulo='', texto=u'DANFE', top=0*cm, left=8*cm, width=3.4*cm, height=4*cm)
        txt.style = DESCRITIVO_DANFE

        txt = self.inclui_texto_sem_borda(nome='danfe_ext', texto=u'DOCUMENTO AUXILIAR DA NOTA FISCAL ELETRÔNICA', top=0.6*cm, left=8*cm, width=3.4*cm, height=4*cm)
        txt.style = DESCRITIVO_DANFE_GERAL

        txt = self.inclui_texto_sem_borda(nome='danfe_ext', texto=u'versão', top=1.1*cm, left=8.8*cm, width=1.4*cm, height=0.6*cm)
        txt.style = DESCRITIVO_DANFE_GERAL

        fld = self.inclui_campo_sem_borda(nome='danfe_entrada_saida', conteudo=u'NFe.infNFe.versao.valor', top=1.1*cm, left=9.8*cm, width=0.6*cm, height=0.6*cm)
        fld.style = DESCRITIVO_DANFE_GERAL

        txt = self.inclui_texto_sem_borda(nome='danfe_entrada', texto=u'0 - ENTRADA', top=1.5*cm, left=8.3*cm, width=3.4*cm, height=4*cm)
        txt.style = DESCRITIVO_DANFE_ES

        txt = self.inclui_texto_sem_borda(nome='danfe_saida', texto=u'1 - SAÍDA', top=1.9*cm, left=8.3*cm, width=3.4*cm, height=4*cm)
        txt.style = DESCRITIVO_DANFE_ES

        fld = self.inclui_campo_sem_borda(nome='danfe_entrada_saida', conteudo=u'NFe.infNFe.ide.tpNF.valor', top=1.65*cm, left=10.4*cm, width=0.6*cm, height=0.6*cm)
        fld.style = DESCRITIVO_NUMERO
        fld.borders = {'top': 0.1, 'right': 0.1, 'bottom': 0.1, 'left': 0.1}
        fld.padding_bottom = 0.2*cm

        fld = self.inclui_campo_sem_borda(nome='danfe_numero', conteudo=u'NFe.numero_formatado', top=2.4*cm, left=8*cm, width=3.4*cm, height=0.5*cm)
        fld.style = DESCRITIVO_NUMERO

        fld = self.inclui_campo_sem_borda(nome='danfe_serie', conteudo=u'NFe.serie_formatada', top=2.85*cm, left=8*cm, width=3.4*cm, height=0.5*cm)
        fld.style = DESCRITIVO_NUMERO

        fld = SystemField(name='fld_danfe_folha', expression=u'FOLHA %(page_number)02d/%(page_count)02d', top=3.3*cm, left=8*cm, width=3.4*cm, height=0.5*cm)
        fld.padding_top = 0.1*cm
        fld.style = DESCRITIVO_NUMERO
        self.elements.append(fld)

        #
        # No caso dos códigos de barra, altura (height) e largura (width) se referem às barras, não à imagem
        #
        self.elements.append(Line(top=0*cm, bottom=0*cm, left=11.4*cm, right=19.4*cm, stroke_width=0.1))
        self.elements.append(BarCode(type=u'Code128', attribute_name=u'NFe.chave_para_codigo_barras', top=((1.625-0.8)/2.0)*cm, left=11.3*cm, width=0.025*cm, height=0.8*cm))

        lbl, fld = self.inclui_campo(nome='remetente_chave', titulo=u'CHAVE DE ACESSO', conteudo=u'NFe.chave_formatada', top=1.625*cm, left=11.4*cm, width=8*cm, margem_direita=True)
        fld.style = DADO_CHAVE

        self.inclui_campo(nome='remetente_natureza', titulo=u'NATUREZA DA OPERAÇÃO', conteudo=u'NFe.infNFe.ide.natOp.valor', top=4*cm, left=0*cm, width=11.4*cm)

        self.inclui_campo(nome='remetente_ie', titulo=u'INSCRIÇÃO ESTADUAL', conteudo=u'NFe.infNFe.emit.IE.valor', top=4.70*cm, left=0*cm, width=6.4*cm)
        self.inclui_campo(nome='remetente_iest', titulo=u'INSCRIÇÃO ESTADUAL DO SUBSTITUTO TRIBUTÁRIO', conteudo=u'NFe.infNFe.emit.IEST.valor', top=4.70*cm, left=6.4*cm, width=6.6*cm)
        self.inclui_campo(nome='remetente_cnpj', titulo=u'CNPJ', conteudo=u'NFe.cnpj_emitente_formatado', top=4.70*cm, left=13*cm, width=6.4*cm, margem_direita=True)

        self.height = 5.4*cm
Пример #4
0
    def __init__(self):
        super(RemetenteRetrato, self).__init__()
        self.elements = []

        # Quadro do emitente
        self.inclui_texto(nome='quadro_emitente', titulo='', texto='', top=0*cm, left=0*cm, width=8*cm, height=4*cm)

        #
        # Área central - Dados do DANFE
        #
        lbl, txt = self.inclui_texto(nome='danfe', titulo='', texto=u'DANFE', top=0*cm, left=8*cm, width=3.4*cm, height=4*cm)
        txt.style = DESCRITIVO_DANFE

        txt = self.inclui_texto_sem_borda(nome='danfe_ext', texto=u'DOCUMENTO AUXILIAR DA NOTA FISCAL ELETRÔNICA', top=0.6*cm, left=8*cm, width=3.4*cm, height=4*cm)
        txt.style = DESCRITIVO_DANFE_GERAL

        txt = self.inclui_texto_sem_borda(nome='danfe_ext', texto=u'versão', top=1.1*cm, left=8.8*cm, width=1.4*cm, height=0.6*cm)
        txt.style = DESCRITIVO_DANFE_GERAL

        fld = self.inclui_campo_sem_borda(nome='danfe_entrada_saida', conteudo=u'NFe.infNFe.versao.valor', top=1.1*cm, left=9.8*cm, width=0.6*cm, height=0.6*cm)
        fld.style = DESCRITIVO_DANFE_GERAL

        txt = self.inclui_texto_sem_borda(nome='danfe_entrada', texto=u'0 - ENTRADA', top=1.5*cm, left=8.3*cm, width=3.4*cm, height=4*cm)
        txt.style = DESCRITIVO_DANFE_ES

        txt = self.inclui_texto_sem_borda(nome='danfe_saida', texto=u'1 - SAÍDA', top=1.9*cm, left=8.3*cm, width=3.4*cm, height=4*cm)
        txt.style = DESCRITIVO_DANFE_ES

        fld = self.inclui_campo_sem_borda(nome='danfe_entrada_saida', conteudo=u'NFe.infNFe.ide.tpNF.valor', top=1.65*cm, left=10.4*cm, width=0.6*cm, height=0.6*cm)
        fld.style = DESCRITIVO_NUMERO
        fld.borders = {'top': 0.1, 'right': 0.1, 'bottom': 0.1, 'left': 0.1}
        fld.padding_bottom = 0.2*cm

        fld = self.inclui_campo_sem_borda(nome='danfe_numero', conteudo=u'NFe.numero_formatado', top=2.4*cm, left=8*cm, width=3.4*cm, height=0.5*cm)
        fld.style = DESCRITIVO_NUMERO

        fld = self.inclui_campo_sem_borda(nome='danfe_serie', conteudo=u'NFe.serie_formatada', top=2.85*cm, left=8*cm, width=3.4*cm, height=0.5*cm)
        fld.style = DESCRITIVO_NUMERO

        fld = SystemField(name='fld_danfe_folha', expression=u'FOLHA %(page_number)02d/%(page_count)02d', top=3.3*cm, left=8*cm, width=3.4*cm, height=0.5*cm)
        fld.padding_top = 0.1*cm
        fld.style = DESCRITIVO_NUMERO
        self.elements.append(fld)

        #
        # No caso dos códigos de barra, altura (height) e largura (width) se referem às barras, não à imagem
        #
        self.elements.append(Line(top=0*cm, bottom=0*cm, left=11.4*cm, right=19.4*cm, stroke_width=0.1))
        self.elements.append(BarCode(type=u'Code128', attribute_name=u'NFe.chave_para_codigo_barras', top=((1.625-0.8)/2.0)*cm, left=11.3*cm, width=0.025*cm, height=0.8*cm))

        lbl, fld = self.inclui_campo(nome='remetente_chave', titulo=u'CHAVE DE ACESSO', conteudo=u'NFe.chave_formatada', top=1.625*cm, left=11.4*cm, width=8*cm, margem_direita=True)
        fld.style = DADO_CHAVE

        self.inclui_campo(nome='remetente_natureza', titulo=u'NATUREZA DA OPERAÇÃO', conteudo=u'NFe.infNFe.ide.natOp.valor', top=4*cm, left=0*cm, width=11.4*cm)

        self.inclui_campo(nome='remetente_ie', titulo=u'INSCRIÇÃO ESTADUAL', conteudo=u'NFe.infNFe.emit.IE.valor', top=4.70*cm, left=0*cm, width=6.4*cm)
        self.inclui_campo(nome='remetente_iest', titulo=u'INSCRIÇÃO ESTADUAL DO SUBSTITUTO TRIBUTÁRIO', conteudo=u'NFe.infNFe.emit.IEST.valor', top=4.70*cm, left=6.4*cm, width=6.6*cm)
        self.inclui_campo(nome='remetente_cnpj', titulo=u'CNPJ', conteudo=u'NFe.cnpj_emitente_formatado', top=4.70*cm, left=13*cm, width=6.4*cm, margem_direita=True)

        self.height = 5.4*cm
Пример #5
0
		class band_page_header(ReportBand):
		    height = 1.3*cm
		    elements = [
			    SystemField(expression='%(report_title)s', top=0.1*cm, left=0, width=BAND_WIDTH,
				style={'fontName': 'Helvetica-Bold', 'fontSize': 14, 'alignment': TA_CENTER}),
			    Label(text="Hostname", top=0.8*cm, left=0.5*cm),
			    Label(text=u"Rack", top=0.8*cm, left=3*cm),
			    SystemField(expression=u'Page %(page_number)d of %(page_count)d', top=0.1*cm,
				width=BAND_WIDTH, style={'alignment': TA_RIGHT}),
			    ]
		    borders = {'bottom': True}
Пример #6
0
    class band_page_footer(ReportBand):
        height = 1 * cm

        elements = [
            SystemField(expression=_(u'%(now:%d/%m/%Y)s às %(now:%H:%M)s'),
                        top=0.3 * cm),
            SystemField(
                expression=_(u'Página %(page_number)d de %(page_count)d'),
                top=0.3 * cm,
                width=BAND_WIDTH,
                style={'alignment': TA_RIGHT}),
        ]
Пример #7
0
    class Header(ReportBand):
        height = 3.4 * cm
        borders = {'bottom': False}
        elements = [
            SystemField(expression='%(report_title)s',
                        top=1.9 * cm,
                        left=0,
                        width=BAND_WIDTH,
                        style={
                            'fontName': 'Helvetica',
                            'fontSize': 12,
                            'alignment': TA_CENTER
                        }),
            SystemField(expression='Page %(page_number)d of %(page_count)d',
                        top=0.7 * cm,
                        width=BAND_WIDTH,
                        style={
                            'fontName': 'Helvetica',
                            'fontSize': 8,
                            'alignment': TA_RIGHT
                        }),
            SystemField(expression='Printed in %(now:%d/%m/%Y %H:%M)s ',
                        top=0.2 * cm,
                        width=BAND_WIDTH,
                        style={
                            'fontName': 'Helvetica',
                            'fontSize': 8,
                            'alignment': TA_RIGHT
                        }),
        ]

        if clinic_info:
            elements.append(
                Label(text="%s" % organization,
                      top=0.9 * cm,
                      left=0,
                      width=BAND_WIDTH,
                      style={
                          'fontName': 'Helvetica-Bold',
                          'fontSize': 14,
                          'alignment': TA_CENTER
                      }))
            if len(organization.photo):
                elements.append(
                    Image(left=0.1 * cm, top=0.1 * cm, filename=imagefile))

        if header_line:
            elements.append(
                Line(left=0.0 * cm,
                     right=19 * cm,
                     top=3.3 * cm,
                     bottom=3.3 * cm))
Пример #8
0
 class band_page_header(ReportBand):
     height = 2.0*cm
     elements = [
             SystemField(expression='%(report_title)s', top=0.7*cm, left=0, width=BAND_WIDTH,
                 style={'fontName': 'Helvetica-Bold', 'fontSize': 10, 'alignment': TA_CENTER}),
             Label(text="Acc Name", top=1.6*cm, left=1.3*cm),
             Label(text="Acc Code", top=1.6*cm, left=14*cm),
             #Label(text=u"Creation Date", top=1.6*cm, left=17*cm),
             SystemField(expression=u'Page %(page_number)d of %(page_count)d', top=0.1*cm,
                 width=BAND_WIDTH, style={'alignment': TA_RIGHT}),
             SystemField(expression='Ruffwall Company', top=0.1*cm,left=0,
                 width=BAND_WIDTH, style={'fontName': 'Helvetica-Bold','fontSize': 14,'alignment': TA_CENTER}),
             ]
     borders = {'bottom': True}
Пример #9
0
 class band_page_header(ReportBand):
     height = 1.3 * cm
     elements = [
         Image(
             top=0.1 * cm,
             left=0,
             width=2.0 * cm,
             height=2.0 * cm,
             filename=os.path.join(
                 RUTA,
                 '../PTACOCOMET/static/SysWeb/ACOCOMET-rpthumbnail.PNG'),
         ),
         SystemField(expression='%(report_title)s',
                     top=0.1 * cm,
                     left=0,
                     width=BAND_WIDTH,
                     style={
                         'fontName': 'Helvetica-Bold',
                         'fontSize': 14,
                         'alignment': TA_CENTER
                     }),
         Label(text='Cooperatíva Financiera Única',
               top=0.8 * cm,
               left=0,
               width=BAND_WIDTH,
               style={
                   'fontName': 'Helvetica-Bold',
                   'fontSize': 10,
                   'alignment': TA_CENTER
               }),
     ]
     borders = {'bottom': True}
Пример #10
0
    class band_page_header(ReportBand):

        height = 1.3 * cm
        elements = [
            Image(left=1 * cm,
                  top=0.1 * cm,
                  right=10 * cm,
                  bottom=0.5 * cm,
                  filename=os.path.join(
                      cur_dir, '../main/static/images/intouchlogo.png')),
            SystemField(expression='%(report_title)s',
                        top=0.1 * cm,
                        left=0,
                        width=BAND_WIDTH,
                        style={
                            'fontName': 'Calibri',
                            'fontSize': 14,
                            'alignment': TA_CENTER
                        }),
            # SystemField(expression=u'Page %(page_number)d of %(page_count)d', top=0.1*cm,
            #     width=BAND_WIDTH, style={'alignment': TA_RIGHT}),
            # Label(text="Name", top=0.8*cm, left=0.5*cm),
            # Label(text="Age", top=0.8*cm, left=5*cm),
            # Label(text="Weight", top=0.8*cm, left=6.5*cm),
        ]
Пример #11
0
    class band_page_footer(ReportBand):
        height = 1 * cm

        elements = [
            SystemField(expression=_(u'%(now:%d/%m/%Y)s às %(now:%H:%M)s'),
                        top=0.3 * cm),
        ]
Пример #12
0
	class band_page_footer(ReportBand):
            height = 0.5*cm
            elements = [
					Label(text='Documento sin validez oficial', top=0.1*cm),
                    SystemField(expression=u'Fecha Elaboracion %(now:%Y, %b %d)s', top=0.1*cm,
						width=BAND_WIDTH, style={'alignment': TA_RIGHT}),
					] 
Пример #13
0
 class band_page_footer(ReportBand):
     height = 0.5*cm
     elements = [
             Label(text='Copyright Ruffwal', top=0.5*cm),
             SystemField(expression=u'Printed in %(now:%Y, %b %d)s at %(now:%H:%M)s', top=0.5*cm,
                 width=BAND_WIDTH, style={'alignment': TA_RIGHT}),
             ]
Пример #14
0
 class band_page_footer(ReportBand):
     height = 0.5*cm
     elements = [
         Label(text="%s" % request.utcnow.date(), top=0.1*cm, left=0),
         SystemField(expression="Page # %(page_number)d of %(page_count)d", top=0.1*cm,
             width=BAND_WIDTH, style={"alignment": TA_RIGHT}),
     ]
     borders = {"top": True}
Пример #15
0
 class band_page_header(ReportBand):
     height = 1.3 * cm
     elements = [
         SystemField(expression='%(report_title)s',
                     top=0.1 * cm,
                     left=0,
                     width=BAND_WIDTH,
                     style={
                         'fontName': 'Helvetica-Bold',
                         'fontSize': 14,
                         'alignment': TA_CENTER
                     }),
         SystemField(expression=u'Page %(page_number)d of %(page_count)d',
                     top=0.1 * cm,
                     width=BAND_WIDTH,
                     style={'alignment': TA_RIGHT}),
     ]
Пример #16
0
		class band_page_footer(ReportBand):
		    height = 0.5*cm
		    elements = [
			    Label(text='Geraldo Reports', top=0.1*cm),
			    SystemField(expression=u'Printed in %(now:%Y, %b %d)s at %(now:%H:%M)s', top=0.1*cm,
				width=BAND_WIDTH, style={'alignment': TA_RIGHT}),
			    ]
		    borders = {'top': True}
Пример #17
0
 class band_page_header(ReportBand):
     height = 1.3 * cm
     elements = [
         SystemField(expression="%(report_title)s",
                     top=0 * cm,
                     left=0,
                     width=BAND_WIDTH,
                     style={
                         'fontName': 'Helvetica-Bold',
                         'fontSize': 14,
                         'alignment': TA_CENTER
                     }),
         SystemField(
             expression="Generated on %(now:%Y, %b %d)s at %(now:%H:%M)s",
             top=0.1 * cm,
             left=0 * cm),
     ]
     borders = {'bottom': True}
Пример #18
0
    class band_page_header(ReportBand):
        height = 4.2 * cm
        label_top = 3.7 * cm
        default_style = {'fontName': 'Helvetica', 'fontSize': 9}

        BASE_DIR = os.path.abspath(os.path.dirname(__file__) + '../../../../')
        #BASE_DIR = os.path.abspath(os.getcwd() + '../..')

        elements = [
            Image(
                filename=BASE_DIR + static('img/logo-interlegis.jpg'),
                left=15.5 * cm,
                right=1 * cm,
                top=0.1 * cm,
                bottom=1 * cm,
                width=4.2 * cm,
                height=3 * cm,
            ),
            Image(
                filename=BASE_DIR + static('img/logo-senado.png'),
                left=1 * cm,
                right=1 * cm,
                top=0.1 * cm,
                bottom=1 * cm,
                width=3 * cm,
                height=3 * cm,
            ),
            Label(text=_(u"SENADO FEDERAL"),
                  top=1 * cm,
                  left=0,
                  width=BAND_WIDTH,
                  style={
                      'fontName': 'Helvetica-Bold',
                      'fontSize': 14,
                      'alignment': TA_CENTER
                  }),
            Label(text=_(u"SINTER - Secretaria Especial do Interlegis"),
                  top=1.5 * cm,
                  left=0,
                  width=BAND_WIDTH,
                  style={
                      'fontName': 'Helvetica-Bold',
                      'fontSize': 13,
                      'alignment': TA_CENTER
                  }),
            SystemField(expression='%(report_title)s',
                        top=2.5 * cm,
                        left=0,
                        width=BAND_WIDTH,
                        style={
                            'fontName': 'Helvetica-Bold',
                            'fontSize': 14,
                            'alignment': TA_CENTER
                        }),
        ]
        borders = {'bottom': True}
Пример #19
0
 class Footer(ReportBand):
     height = 0.5 * cm
     borders = {'top': True}
     default_style = {
         'fontName': 'Helvetica',
         'fontSize': 8,
         'alignment': TA_CENTER
     }
     elements = [
         SystemField(expression=u'%s' % line1,
                     top=0.1 * cm,
                     width=BAND_WIDTH),
         SystemField(expression=u'%s' % line2,
                     top=0.4 * cm,
                     width=BAND_WIDTH),
         SystemField(expression=u'%s' % line3,
                     top=0.7 * cm,
                     width=BAND_WIDTH),
     ]
Пример #20
0
 class band_page_footer(ReportBand):
     height = 0.5 * cm
     elements = [
         Label(text='Created with Geraldo Reports', top=0.1 * cm, right=0),
         SystemField(
             expression='Printed in %(now:%Y, %b %d)s at %(now:%H:%M)s',
             top=0.1 * cm,
             width=BAND_WIDTH,
             style={'alignment': TA_RIGHT}),
     ]
     borders = {'top': Line(stroke_color=red, stroke_width=3)}
Пример #21
0
 class band_page_footer(ReportBand):
     height = 0.5 * cm
     elements = [
         Label(text='Intouch Communications', top=0.1 * cm),
         # SystemField(expression='Printed in %(now:%Y, %b %d)s at %(now:%H:%M)s', top=0.1*cm,
         #     width=BAND_WIDTH, style={'alignment': TA_RIGHT}),
         SystemField(expression=u'Page %(page_number)d of %(page_count)d',
                     top=0.1 * cm,
                     width=BAND_WIDTH,
                     style={'alignment': TA_RIGHT}),
     ]
     borders = {'top': True}
Пример #22
0
 class band_page_footer(ReportBand):
     height = 0.5 * cm
     elements = [
         Label(text='Created with Geraldo Reports', top=0.1 * cm, left=0),
         SystemField(
             expression=
             'Page # %(page_number)d (%(first_page_number)d ~ %(last_page_number)d, total: %(page_count)d)',
             top=0.1 * cm,
             width=BAND_WIDTH,
             style={'alignment': TA_RIGHT}),
     ]
     borders = {'top': True}
Пример #23
0
 class band_summary(ReportBand):
     height = 0.8 * cm
     elements = [
         SystemField(expression=u'----------------------------------------------------------------------------------------------------------------------------------------------------------------', top=0.1*cm,
                 width=BAND_WIDTH),
         Label(text="Lucro", top=0.5*cm,style={'fontName': 'Helvetica-Bold'}, left=0.5*cm),
         ObjectValue(attribute_name='valorCobrado', top=0.5*cm, left=4*cm,\
             action=FIELD_ACTION_SUM),
         Label(text="Gastos", top=1*cm, style={'fontName': 'Helvetica-Bold'},left=0.5*cm),
         ObjectValue(attribute_name='valorGasto', top=1*cm, left=4*cm,\
             action=FIELD_ACTION_SUM),
     ]
Пример #24
0
 class band_page_header(ReportBand):
     height = 1.3 * cm
     elements = [
         SystemField(expression='%(report_title)s',
                     top=0.1 * cm,
                     left=0,
                     width=BAND_WIDTH,
                     style={
                         'fontName': 'Helvetica-Bold',
                         'fontSize': 18,
                         'alignment': TA_CENTER
                     }),
         Label(text=u"Cliente", top=0.8 * cm, left=0.5 * cm),
         Label(text="Data da Venda", top=0.8 * cm, left=6 * cm),
         Label(text=u"Valor Cobrado", top=0.8 * cm, left=10 * cm),
         Label(text=u"Valor Gasto", top=0.8 * cm, left=14 * cm),
         SystemField(expression=u'Pagina %(page_number)d de %(page_count)d',
                     top=0.1 * cm,
                     width=BAND_WIDTH,
                     style={'alignment': TA_RIGHT}),
     ]
     borders = {'bottom': True}
Пример #25
0
    class band_page_header(ReportBand):
        height = 1.5*cm
        elements = [ Image(left=0.4*cm, top=0, width=4*cm, height=5.12*cm,
                    filename= os.path.join(RUTA_PROYECTO,'../media/img/escom.gif')),


                    SystemField(expression='%(report_title)s', top=0.1*cm, left=0, width=BAND_WIDTH,
                        style={'fontName': 'Helvetica-Bold', 'fontSize': 21, 'alignment': TA_CENTER}),
                    Label(text="Escuela Superior de Cómputo", top=0.8*cm, left=0,width=BAND_WIDTH,
                        style={'fontName': 'Helvetica-Bold', 'fontSize': 16, 'alignment': TA_CENTER}),

                    Label(text="Nombre", top=7*cm, left=3*cm, width=1.5*cm, style={'fontName': 'Helvetica-Bold', 'fontSize':8 ,'borderWidth': 1, 'borderColor': navy,
                    'borderPadding': 1, 'borderRadius': 2}),
                    Label(text="Boleta", top=7*cm, left=0.5*cm,width=1.5*cm,style={'fontName': 'Helvetica-Bold', 'fontSize':8,'borderWidth': 1, 'borderColor': navy,
                    'borderPadding': 1, 'borderRadius': 2}),
                    Label(text="Calificación", top=7*cm, left=8*cm,width=1.5*cm,style={'fontName': 'Helvetica-Bold', 'fontSize':8,'borderWidth': 1, 'borderColor': navy,
                    'borderPadding': 1, 'borderRadius': 2}),

                    SystemField(expression=u'Pagina %(page_number)d de %(page_count)d', top=0.1*cm,
                        width=BAND_WIDTH, style={'alignment': TA_RIGHT}),
                    ]
        borders = {'bottom': Line(stroke_width=5)}
Пример #26
0
 class band_page_header(ReportBand):
     height = 1.8 * cm
     bElements = [
         SystemField(expression='%(report_title)s',
                     top=0.5 * cm,
                     left=0,
                     width=BAND_WIDTH,
                     style={
                         'fontName': 'Helvetica-Bold',
                         'fontSize': 14,
                         'alignment': TA_CENTER
                     }),
         SystemField(expression=_('Page %(page_number)d of %(page_count)d'),
                     top=0.1 * cm,
                     width=BAND_WIDTH,
                     style={'alignment': TA_RIGHT}),
         UDSImage(filename=stock.getStockImagePath(stock.LOGO),
                  left=0.0 * cm,
                  top=0.0 * cm,
                  width=2.0 * cm,
                  height=2.0 * cm),
     ]
     borders = {'bottom': Line(stroke_color=colors.red, stroke_width=3)}
Пример #27
0
 class band_page_header(ReportBand):
     height = 1.2 * cm
     elements = [
         SystemField(expression='%(report_title)s',
                     top=0.1 * cm,
                     left=0,
                     width=BAND_WIDTH,
                     style={
                         'fontName': 'Helvetica-Bold',
                         'fontSize': 14,
                         'alignment': TA_CENTER
                     }),
         Label(text="ID", top=0.8 * cm, left=0.5 * cm),
         Label(text=u"usuario", top=0.8 * cm, left=2.5 * cm),
         Label(text=u"Nombre", top=0.8 * cm, left=4.5 * cm),
         Label(text=u"Apellido", top=0.8 * cm, left=6.5 * cm),
         Label(text=u"Email", top=0.8 * cm, left=8.5 * cm),
         SystemField(expression=u'Page %(page_number)d of %(page_count)d',
                     top=0.1 * cm,
                     width=BAND_WIDTH,
                     style={'alignment': TA_RIGHT}),
     ]
     borders = {'bottom': True}
Пример #28
0
 class band_page_header(ReportBand):
     height = 1.2 * cm
     elements = [
         SystemField(expression='%(report_title)s',
                     top=0.1 * cm,
                     left=0,
                     width=BAND_WIDTH,
                     style={
                         'fontName': 'Helvetica-Bold',
                         'fontSize': 14,
                         'alignment': TA_CENTER
                     }),
         Label(text="ID", top=0.8 * cm, left=0.5 * cm),
         Label(text=u"Nombre", top=0.8 * cm, left=1.5 * cm),
         Label(text=u"Categoria", top=0.8 * cm, left=4.5 * cm),
         Label(text=u"Descripcion", top=0.8 * cm, left=6.5 * cm),
         Label(text=u"Fecha/Creacion", top=0.8 * cm, left=12 * cm),
         Label(text=u"Usuario/Creador", top=0.8 * cm, left=16.5 * cm),
         SystemField(expression=u'Page %(page_number)d of %(page_count)d',
                     top=0.1 * cm,
                     width=BAND_WIDTH,
                     style={'alignment': TA_RIGHT}),
     ]
     borders = {'bottom': True}
Пример #29
0
 class band_page_header(ReportBand):
     height = 1.2 * cm
     elements = [
         SystemField(expression='%(report_title)s',
                     top=0.1 * cm,
                     left=0,
                     width=BAND_WIDTH,
                     style={
                         'fontName': 'Helvetica-Bold',
                         'fontSize': 14,
                         'alignment': TA_CENTER
                     }),
         Label(text="ID", top=0.8 * cm, left=0.5 * cm),
         Label(text=u"Nombre", top=0.8 * cm, left=2 * cm),
         Label(text=u"Proyecto", top=0.8 * cm, left=4 * cm),
         Label(text=u"Complej.", top=0.8 * cm, left=5.5 * cm),
         Label(text=u"Descrip_corta", top=0.8 * cm, left=7 * cm),
         Label(text=u"Descrip_larga", top=0.8 * cm, left=11 * cm),
         SystemField(expression=u'Page %(page_number)d of %(page_count)d',
                     top=0.1 * cm,
                     width=BAND_WIDTH,
                     style={'alignment': TA_RIGHT}),
     ]
     borders = {'bottom': True}
Пример #30
0
	class band_page_header(ReportBand):
            height = 1.5*cm
            elements = [ Image(left=0.4*cm, top=0, width=4*cm, height=5.12*cm,
						filename= os.path.join(RUTA_PROYECTO,'../Alumno/escom.gif')),
                        SystemField(expression='%(report_title)s', top=0.1*cm, left=0, width=BAND_WIDTH,
                        style={'fontName': 'Helvetica-Bold', 'fontSize': 21, 'alignment': TA_CENTER}),
						Label(text="Escuela Superior de Cómputo", top=0.8*cm, left=0,width=BAND_WIDTH,
                        style={'fontName': 'Helvetica-Bold', 'fontSize': 16, 'alignment': TA_CENTER}),
                        
						Label(text="Clave", top=6.6*cm, left=0.2*cm, width=1.5*cm, style={'fontName': 'Helvetica-Bold', 'fontSize':8}),
                        Label(text="Materia", top=6.6*cm, left=2*cm, width=1.5*cm, style={'fontName': 'Helvetica-Bold', 'fontSize':8}),
                        Label(text="Periodo", top=6.6*cm, left=6.0*cm, width=1.5*cm, style={'fontName': 'Helvetica-Bold', 'fontSize':8}),
                        Label(text="Evaluación", top=6.6*cm, left=8.0*cm, width=1.5*cm, style={'fontName': 'Helvetica-Bold', 'fontSize':8}),
                        Label(text="Calificación", top=6.6*cm, left=10*cm, width=1.5*cm, style={'fontName': 'Helvetica-Bold', 'fontSize':8}),
                        ]
Пример #31
0
 class band_page_header(ReportBand):
     height = 1.3*cm
     elements = [
         SystemField(expression="%(report_title)s", top=0.1*cm,
             left=0, width=BAND_WIDTH, style={"fontName": "Helvetica-Bold",
             "fontSize": 14, "alignment": TA_CENTER}
             ),
         Label(text="Code", top=0.8*cm, left=0.2*cm),
         Label(text="Description", top=0.8*cm, left=3*cm),
         Label(text="Unit Cost", top=0.8*cm, left=13*cm),
         Label(text="per Month", top=0.8*cm, left=15*cm),
         Label(text="per Minute", top=0.8*cm, left=17*cm),
         Label(text="per Megabyte", top=0.8*cm, left=19*cm),
         Label(text="Comments", top=0.8*cm, left=21*cm),
     ]
     borders = {"bottom": True}