fixes bug#11452
dev:Claudio qua:Renato git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@83114 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
69fb9713ff
commit
482d09a055
|
@ -6,12 +6,14 @@ import java.util.Locale;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import net.sf.jasperreports.engine.JRDataSource;
|
import net.sf.jasperreports.engine.JRDataSource;
|
||||||
|
import net.sf.jasperreports.engine.JRParagraph;
|
||||||
import net.sf.jasperreports.engine.JRParameter;
|
import net.sf.jasperreports.engine.JRParameter;
|
||||||
import net.sf.jasperreports.engine.JasperExportManager;
|
import net.sf.jasperreports.engine.JasperExportManager;
|
||||||
import net.sf.jasperreports.engine.JasperFillManager;
|
import net.sf.jasperreports.engine.JasperFillManager;
|
||||||
import net.sf.jasperreports.engine.JasperPrint;
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
import net.sf.jasperreports.engine.export.JExcelApiExporter;
|
import net.sf.jasperreports.engine.export.JExcelApiExporter;
|
||||||
import net.sf.jasperreports.engine.export.JExcelApiExporterParameter;
|
import net.sf.jasperreports.engine.export.JExcelApiExporterParameter;
|
||||||
|
import net.sf.jasperreports.engine.util.JRProperties;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
@ -108,11 +110,15 @@ public class RenderRelatorioJasper {
|
||||||
this.preRender();
|
this.preRender();
|
||||||
|
|
||||||
byte[] conteudo = null;
|
byte[] conteudo = null;
|
||||||
|
try {
|
||||||
if (this.jasperPrint == null) {
|
if (this.jasperPrint == null) {
|
||||||
|
|
||||||
if (this.relatorio.isCollectionDataSource()) {
|
if (this.relatorio.isCollectionDataSource()) {
|
||||||
|
if (!StringUtils.isBlank(this.relatorio.getNome()) && this.relatorio.getNome().equalsIgnoreCase("RelatorioGratuidade")) {
|
||||||
|
JRProperties.setProperty(JRParagraph.DEFAULT_TAB_STOP_WIDTH, "10");
|
||||||
|
}
|
||||||
this.jasperPrint = JasperFillManager.fillReport(this.getTemplateInputStream(), this.relatorio.getParametros(), this.relatorio.getCollectionDataSource());
|
this.jasperPrint = JasperFillManager.fillReport(this.getTemplateInputStream(), this.relatorio.getParametros(), this.relatorio.getCollectionDataSource());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (this.relatorio.isCustomDataSource())
|
if (this.relatorio.isCustomDataSource())
|
||||||
this.jasperPrint = JasperFillManager.fillReport(this.getTemplateInputStream(), this.relatorio.getParametros(), (JRDataSource) this.relatorio.getCustomDataSource());
|
this.jasperPrint = JasperFillManager.fillReport(this.getTemplateInputStream(), this.relatorio.getParametros(), (JRDataSource) this.relatorio.getCustomDataSource());
|
||||||
|
@ -133,6 +139,15 @@ public class RenderRelatorioJasper {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO: handle exception
|
||||||
|
throw new Exception();
|
||||||
|
} finally {
|
||||||
|
if (!StringUtils.isBlank(this.relatorio.getNome()) && this.relatorio.getNome().equalsIgnoreCase("RelatorioGratuidade")) {
|
||||||
|
JRProperties.setProperty(JRParagraph.DEFAULT_TAB_STOP_WIDTH, "40");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return conteudo;
|
return conteudo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue