issue #8301 - Logo Artesp
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@64697 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
d0b9688947
commit
4c8f7fa889
|
@ -1,11 +1,16 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.SegVKMService;
|
||||
|
@ -28,6 +33,10 @@ public class RelatorioTabelaPreco extends Relatorio {
|
|||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, getSql());
|
||||
ResultSet rset = stmt.executeQuery();
|
||||
|
||||
BufferedImage artespLogo=
|
||||
ImageIO.read(getClass().getResource(this.relatorio.getBaseDir()+"/imagens/artesp.png"));
|
||||
parametros.put("artesp_logo", artespLogo);
|
||||
|
||||
String series = RelatorioTabelaPreco.this.segVKMService.seriePorEmpresa((Integer) parametros.get("EMPRESA_ID"));
|
||||
while (rset.next()) {
|
||||
Map<String, Object> dataResult = new HashMap<String, Object>();
|
||||
|
|
|
@ -61,9 +61,7 @@ public class RenderRelatorioJasper {
|
|||
|
||||
ResourceBundle resource = ResourceBundle.getBundle("com.rjconsultores.ventaboletos.relatorios.internacionalizacao." + this.relatorio.getNome(), locale);
|
||||
this.relatorio.getParametros().put(JRParameter.REPORT_RESOURCE_BUNDLE, resource);
|
||||
this.relatorio.getParametros().put("BASE_DIR", getClass().getResource(this.relatorio.getBaseDir()).getPath());
|
||||
log.info("Base dir="+relatorio.getParametros().get("BASE_DIR"));
|
||||
|
||||
|
||||
/* Adicionar o arquivo de internacionalização para o subreporte quando informado */
|
||||
if(this.relatorio.getNomeSubReporte() != null && this.relatorio.getNomeSubReporte().length > 0) {
|
||||
if(this.relatorio.getNomeSubReporte().length == 1 && StringUtils.isNotBlank(this.relatorio.getNomeSubReporte()[0])) {
|
||||
|
|
Binary file not shown.
|
@ -1,9 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioTabelaPreco" pageWidth="900" pageHeight="842" orientation="Landscape" columnWidth="860" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="5edc9f7a-8634-485f-96f7-c65a462aa868">
|
||||
<property name="ireport.zoom" value="0.9090909090909127"/>
|
||||
<property name="ireport.x" value="56"/>
|
||||
<property name="ireport.zoom" value="1.000000000000004"/>
|
||||
<property name="ireport.x" value="38"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="BASE_DIR" class="java.lang.String"/>
|
||||
<parameter name="artesp_logo" class="java.lang.Object"/>
|
||||
<field name="origem" class="java.lang.String"/>
|
||||
<field name="destino" class="java.lang.String"/>
|
||||
<field name="tarifa" class="java.math.BigDecimal"/>
|
||||
|
@ -274,7 +275,7 @@
|
|||
</band>
|
||||
</detail>
|
||||
<pageFooter>
|
||||
<band height="47" splitType="Stretch">
|
||||
<band height="57" splitType="Stretch">
|
||||
<rectangle>
|
||||
<reportElement uuid="88249295-7646-48b5-b723-522631570fc7" x="0" y="15" width="802" height="30" backcolor="#CCCCCC"/>
|
||||
<graphicElement>
|
||||
|
@ -282,22 +283,22 @@
|
|||
</graphicElement>
|
||||
</rectangle>
|
||||
<textField>
|
||||
<reportElement uuid="b7957c63-89ec-4009-b196-373a274b59e1" mode="Opaque" x="0" y="15" width="860" height="29" backcolor="#CCCCCC"/>
|
||||
<reportElement uuid="b7957c63-89ec-4009-b196-373a274b59e1" mode="Opaque" x="0" y="13" width="860" height="44" backcolor="#CCCCCC"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font fontName="SansSerif" size="10" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.msgAviso}]]></textFieldExpression>
|
||||
</textField>
|
||||
<image onErrorType="Blank">
|
||||
<reportElement uuid="804159e8-555b-475f-a036-836a4230c641" x="0" y="16" width="186" height="29"/>
|
||||
<imageExpression><![CDATA[$P{BASE_DIR}+"/imagens/artesp.png"]]></imageExpression>
|
||||
<reportElement uuid="804159e8-555b-475f-a036-836a4230c641" x="0" y="16" width="186" height="41"/>
|
||||
<imageExpression><![CDATA[$P{artesp_logo}]]></imageExpression>
|
||||
</image>
|
||||
</band>
|
||||
</pageFooter>
|
||||
<noData>
|
||||
<band height="30">
|
||||
<textField>
|
||||
<reportElement uuid="5954ac3d-3873-40e1-b643-cd910fa11ef2" x="0" y="1" width="860" height="26"/>
|
||||
<reportElement uuid="5954ac3d-3873-40e1-b643-cd910fa11ef2" x="0" y="4" width="860" height="26"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font fontName="SansSerif" size="11" isBold="true"/>
|
||||
</textElement>
|
||||
|
|
Loading…
Reference in New Issue