issue #8301 - fonte arial para sanserif
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@64436 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
9e3b66d69f
commit
36ef46a824
|
@ -58,9 +58,10 @@ public class RenderRelatorioJasper {
|
|||
|
||||
Locale locale = LocaleUtil.getLocale();
|
||||
try {
|
||||
|
||||
|
||||
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());
|
||||
|
||||
/* Adicionar o arquivo de internacionalização para o subreporte quando informado */
|
||||
if(this.relatorio.getNomeSubReporte() != null && this.relatorio.getNomeSubReporte().length > 0) {
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
<?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="0"/>
|
||||
<property name="ireport.x" value="56"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="BASE_DIR" class="java.lang.String"/>
|
||||
<field name="origem" class="java.lang.String"/>
|
||||
|
@ -38,14 +38,14 @@
|
|||
<textField>
|
||||
<reportElement uuid="5d83d8a8-01aa-4022-9583-6808e65d2ec8" mode="Opaque" x="0" y="0" width="321" height="33" backcolor="#FFFF66"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font fontName="Arial" size="20" isBold="true"/>
|
||||
<font fontName="SansSerif" size="20" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="2c5b01a1-51db-478a-a307-83c9df5cea6e" x="321" y="0" width="539" height="33"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font fontName="Arial" size="14" isBold="true"/>
|
||||
<font fontName="SansSerif" size="14" isBold="true"/>
|
||||
<paragraph leftIndent="4"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression>
|
||||
|
@ -57,7 +57,7 @@
|
|||
<staticText>
|
||||
<reportElement uuid="325e439b-ecaf-48cb-9c09-387c0649e47b" x="0" y="0" width="860" height="20"/>
|
||||
<textElement textAlignment="Center">
|
||||
<font fontName="Arial" size="12" isBold="true"/>
|
||||
<font fontName="SansSerif" size="12" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Tabela de Preços R$]]></text>
|
||||
</staticText>
|
||||
|
@ -75,7 +75,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font fontName="Arial" size="10" isBold="true"/>
|
||||
<font fontName="SansSerif" size="10" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.destino}]]></textFieldExpression>
|
||||
</textField>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font fontName="Arial" size="8" isBold="true"/>
|
||||
<font fontName="SansSerif" size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.tarifa}]]></textFieldExpression>
|
||||
</textField>
|
||||
|
@ -103,7 +103,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font fontName="Arial" size="8" isBold="true"/>
|
||||
<font fontName="SansSerif" size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.pedagio}]]></textFieldExpression>
|
||||
</textField>
|
||||
|
@ -117,7 +117,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font fontName="Arial" size="8" isBold="true"/>
|
||||
<font fontName="SansSerif" size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.taxaEmbarque}]]></textFieldExpression>
|
||||
</textField>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font fontName="Arial" size="8" isBold="true"/>
|
||||
<font fontName="SansSerif" size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.totalSemSeguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
|
@ -145,7 +145,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font fontName="Arial" size="8" isBold="true"/>
|
||||
<font fontName="SansSerif" size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.totalComSeguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
|
@ -159,7 +159,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||
<font fontName="Arial" size="8" isBold="true"/>
|
||||
<font fontName="SansSerif" size="8" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.valorSeguro}]]></textFieldExpression>
|
||||
</textField>
|
||||
|
@ -177,7 +177,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement>
|
||||
<font fontName="Arial" size="12" isBold="true"/>
|
||||
<font fontName="SansSerif" size="12" isBold="true"/>
|
||||
<paragraph leftIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{destino}+" ("+$F{tipoClasse}+")"]]></textFieldExpression>
|
||||
|
@ -192,7 +192,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center">
|
||||
<font fontName="Arial" size="10" isBold="true"/>
|
||||
<font fontName="SansSerif" size="10" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{tarifa}]]></textFieldExpression>
|
||||
|
@ -207,7 +207,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center">
|
||||
<font fontName="Arial" size="12" isBold="true"/>
|
||||
<font fontName="SansSerif" size="12" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{totalSeguro}]]></textFieldExpression>
|
||||
|
@ -222,7 +222,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center">
|
||||
<font fontName="Arial" size="12" isBold="true"/>
|
||||
<font fontName="SansSerif" size="12" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{total}]]></textFieldExpression>
|
||||
|
@ -237,7 +237,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center">
|
||||
<font fontName="Arial" size="10" isBold="true"/>
|
||||
<font fontName="SansSerif" size="10" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{taxaEmbarque}]]></textFieldExpression>
|
||||
|
@ -252,7 +252,7 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center">
|
||||
<font fontName="Arial" size="10" isBold="true"/>
|
||||
<font fontName="SansSerif" size="10" isBold="true"/>
|
||||
<paragraph rightIndent="2"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{pedagio}]]></textFieldExpression>
|
||||
|
@ -267,14 +267,14 @@
|
|||
<rightPen lineWidth="0.25" lineColor="#CCCCCC"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center">
|
||||
<font fontName="Arial" isBold="true"/>
|
||||
<font fontName="SansSerif" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{seguroOpcional}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<pageFooter>
|
||||
<band height="46" splitType="Stretch">
|
||||
<band height="47" splitType="Stretch">
|
||||
<rectangle>
|
||||
<reportElement uuid="88249295-7646-48b5-b723-522631570fc7" x="0" y="15" width="802" height="30" backcolor="#CCCCCC"/>
|
||||
<graphicElement>
|
||||
|
@ -284,18 +284,22 @@
|
|||
<textField>
|
||||
<reportElement uuid="b7957c63-89ec-4009-b196-373a274b59e1" mode="Opaque" x="0" y="15" width="860" height="29" backcolor="#CCCCCC"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font fontName="Arial" size="10" isBold="true"/>
|
||||
<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>
|
||||
</image>
|
||||
</band>
|
||||
</pageFooter>
|
||||
<noData>
|
||||
<band height="27">
|
||||
<band height="30">
|
||||
<textField>
|
||||
<reportElement uuid="5954ac3d-3873-40e1-b643-cd910fa11ef2" x="0" y="1" width="860" height="26"/>
|
||||
<textElement textAlignment="Center" markup="none">
|
||||
<font fontName="Arial" size="11" isBold="true"/>
|
||||
<font fontName="SansSerif" size="11" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||
</textField>
|
||||
|
|
|
@ -19,6 +19,7 @@ import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
|||
public abstract class Relatorio {
|
||||
|
||||
private static Logger log = Logger.getLogger(Relatorio.class);
|
||||
private static final String DEFAULT_BASE_DIR = "/com/rjconsultores/ventaboletos/relatorios";
|
||||
|
||||
private Connection conexao;
|
||||
protected Map<String, Object> parametros;
|
||||
|
@ -28,6 +29,7 @@ public abstract class Relatorio {
|
|||
private Set<String> infoMsg;
|
||||
private JRBeanCollectionDataSource collectionDataSource;
|
||||
private String[] nomeSubReporte;
|
||||
private String baseDir;
|
||||
|
||||
protected Relatorio(Map<String, Object> parametros, Connection conexao) {
|
||||
this.parametros = parametros;
|
||||
|
@ -157,4 +159,14 @@ public abstract class Relatorio {
|
|||
log.error("Erro ao fechar a conexion", e);
|
||||
}
|
||||
}
|
||||
|
||||
public String getBaseDir() {
|
||||
//setado como parametro em RenderRelatorioJasper com a chave "BASE_DIR"
|
||||
return baseDir == null ? DEFAULT_BASE_DIR : baseDir;
|
||||
}
|
||||
|
||||
public void setBaseDir(String baseDir) {
|
||||
this.baseDir = baseDir;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue