本文整理汇总了Java中net.sf.jasperreports.engine.JasperPrintManager.printReport方法的典型用法代码示例。如果您正苦于以下问题:Java JasperPrintManager.printReport方法的具体用法?Java JasperPrintManager.printReport怎么用?Java JasperPrintManager.printReport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jasperreports.engine.JasperPrintManager
的用法示例。
在下文中一共展示了JasperPrintManager.printReport方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: imprimirGrafico
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
public void imprimirGrafico( final TYPE_PRINT bVisualizar, final ResultSet rs, final String sCab, final boolean bComRef , String rel ) {
HashMap<String, Object> hParam = new HashMap<String, Object>();
// hParam.put( "COMREF", bComRef ? "S" : "N" );
FPrinterJob dlGr = null;
dlGr = new FPrinterJob( rel, "Relatório Balanço de Produção por grupo", sCab, rs, hParam, this );
if ( bVisualizar==TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
try {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
} catch ( Exception err ) {
Funcoes.mensagemErro( this, "Erro na impressão de relatório de consumo!" + err.getMessage(), true, con, err );
}
}
}
示例2: imprimiGrafico
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
private void imprimiGrafico( final TYPE_PRINT bVisualizar, final ResultSet rs, final String sCab ) {
FPrinterJob dlGr = null;
HashMap<String, Object> hParam = new HashMap<String, Object>();
hParam.put( "CODEMP", Aplicativo.iCodEmp );
hParam.put( "CODFILIAL", ListaCampos.getMasterFilial( "FNPAGAR" ) );
hParam.put( "RAZAOEMP", Aplicativo.empresa.toString() );
hParam.put( "FILTROS", sCab );
dlGr = new FPrinterJob( "relatorios/FRRazFor.jasper", "Relatório de Razão por fornecedor", sCab, rs, hParam, this );
if ( bVisualizar==TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
try {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
} catch ( Exception err ) {
Funcoes.mensagemErro( this, "Erro na impressão de relatório por razão!" + err.getMessage(), true, con, err );
}
}
}
示例3: imprimiGrafico
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
private void imprimiGrafico( final ResultSet rs, final TYPE_PRINT bVisualizar ) {
FPrinterJob dlGr = null;
HashMap<String, Object> hParam = new HashMap<String, Object>();
hParam.put( "CODEMP", Aplicativo.iCodEmp );
hParam.put( "CODFILIAL", ListaCampos.getMasterFilial( "CPCOMPRA" ) );
hParam.put( "RAZAOEMP", Aplicativo.empresa.toString() );
hParam.put( "TICKET", txtTicket.getVlrInteger() );
EmailBean email = Aplicativo.getEmailBean();
email.setPara( txtEmailCli.getVlrString() );
dlGr = new FPrinterJob( "layout/col/COL_PD.jasper", "Coleta", "", rs, hParam, this, email );
if ( bVisualizar==TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
try {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
} catch ( Exception err ) {
Funcoes.mensagemErro( this, "Erro na impressão de relatório coleta!" + err.getMessage(), true, con, err );
}
}
}
示例4: imprimiGrafico
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
private void imprimiGrafico( final TYPE_PRINT bVisualizar, final ResultSet rs, final String sCab ) {
FPrinterJob dlGr = null;
HashMap<String, Object> hParam = new HashMap<String, Object>();
hParam.put( "CODEMP", Aplicativo.iCodEmp );
hParam.put( "CODFILIAL", ListaCampos.getMasterFilial( "VDCLIENTE" ) );
hParam.put( "RAZAOEMP", Aplicativo.empresa.toString() );
hParam.put( "FILTROS", sCab );
dlGr = new FPrinterJob( "layout/rel/REL_CLI_SEM_VD_01.jasper", "Relatório de clientes sem movimento", sCab, rs, hParam, this );
if ( bVisualizar==TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
try {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
} catch ( Exception err ) {
Funcoes.mensagemErro( this, "Erro na impressão do relatório!" + err.getMessage(), true, con, err );
}
}
}
示例5: imprimirGrafico
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
public void imprimirGrafico( final TYPE_PRINT bVisualizar, final ResultSet rs, boolean isrota) {
FPrinterJob dlGr = null;
if(isrota) {
dlGr = new FPrinterJob( "relatorios/Setor_rota.jasper", "Relatorio de rota", null, rs, null, this );
}
else {
dlGr = new FPrinterJob( "relatorios/Setor.jasper", "Relatorio por Setor", null, rs, null, this );
}
if ( bVisualizar==TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
try {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
} catch ( Exception err ) {
Funcoes.mensagemErro( this, "Erro na impressão do relatorio por Setor!" + err.getMessage(), true, con, err );
}
}
}
示例6: imprimiGrafico
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
private void imprimiGrafico( final TYPE_PRINT bVisualizar, final ResultSet rs, final String sCab ) {
FPrinterJob dlGr = null;
HashMap<String, Object> hParam = new HashMap<String, Object>();
hParam.put( "CODEMP", Aplicativo.iCodEmp );
hParam.put( "CODFILIAL", ListaCampos.getMasterFilial( "FNRECEBER" ) );
hParam.put( "RAZAOEMP", Aplicativo.empresa.toString() );
hParam.put( "FILTROS", sCab );
dlGr = new FPrinterJob( "relatorios/FRRazCli.jasper", "Relatório de Razão por Cliente", sCab, rs, hParam, this );
if ( bVisualizar==TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
try {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
} catch ( Exception err ) {
Funcoes.mensagemErro( this, "Erro na impressão de relatório por razão!" + err.getMessage(), true, con, err );
}
}
}
示例7: imprimir
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
@ Override
public void imprimir( TYPE_PRINT visualizar ) {
try {
StringBuilder sql = new StringBuilder();
sql.append( "SELECT CODGRUP, DESCGRUP, SIGLAGRUP " );
sql.append( "FROM RPGRUPO " );
sql.append( "WHERE CODEMP=? AND CODFILIAL=? " );
sql.append( "ORDER BY " + rgOrdem.getVlrString() );
PreparedStatement ps = con.prepareStatement( sql.toString() );
ps.setInt( 1, Aplicativo.iCodEmp );
ps.setInt( 2, ListaCampos.getMasterFilial( "RPGRUPO" ) );
ResultSet rs = ps.executeQuery();
HashMap<String, Object> hParam = new HashMap<String, Object>();
hParam.put( "CODEMP", Aplicativo.iCodEmp );
hParam.put( "REPORT_CONNECTION", con.getConnection() );
FPrinterJob dlGr = new FPrinterJob( "modulos/rep/relatorios/rpgrupo.jasper", "GRUPOS DE PRODUTOS", null, rs, hParam, this );
if ( visualizar == TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
}
} catch ( Exception e ) {
Funcoes.mensagemErro( this, "Erro ao montar relatorio!\n" + e.getMessage() );
e.printStackTrace();
}
}
示例8: print
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
/**
*
*/
public void print() throws JRException
{
File[] files = getFiles(new File("build/reports"), "jrprint");
for(int i = 0; i < files.length; i++)
{
File reportFile = files[i];
long start = System.currentTimeMillis();
JasperPrintManager.printReport(reportFile.getAbsolutePath(), true);
System.err.println("Report : " + reportFile + ". Printing time : " + (System.currentTimeMillis() - start));
}
}
示例9: print
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
/**
*
*/
public void print() throws JRException
{
JasperPrint jasperPrint = fillReport();
JasperPrintManager.printReport(jasperPrint, true);
}
示例10: imprimirGrafico
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
private void imprimirGrafico( final TYPE_PRINT bVisualizar, final ResultSet rs, final String sDataini,
final String sDatafim, final String sCodConta, final String sCodCC, final StringBuilder filtros ) {
FPrinterJob dlGr = null;
HashMap<String, Object> hParam = new HashMap<String, Object>();
filtros.append( " - PERÍODO DE " );
filtros.append( sDataini );
filtros.append( " A " );
filtros.append( sDatafim );
hParam.put( "CODEMP", Aplicativo.iCodEmp );
hParam.put( "CODFILIAL", ListaCampos.getMasterFilial( "FNLANCA" ) );
hParam.put( "RAZAOEMP", Aplicativo.empresa.toString() );
//hParam.put( "FILTROS", filtros.toString() );
dlGr = new FPrinterJob( "relatorios/balancete.jasper", "Balancete", filtros.toString(), rs, hParam, this );
if ( bVisualizar==TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
try {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
} catch ( Exception err ) {
Funcoes.mensagemErro( this, "Erro na impressão do balancete!\n" + err.getMessage(), true, con, err );
}
}
}
示例11: imprimirGrafico
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
private void imprimirGrafico( final TYPE_PRINT bVisualizar, final ResultSet rs, final String sCab ) {
FPrinterJob dlGr = null;
HashMap<String, Object> hParam = new HashMap<String, Object>();
hParam.put( "CODEMP", Aplicativo.iCodEmp );
hParam.put( "CODFILIAL", ListaCampos.getMasterFilial( "FNPAGAR" ) );
hParam.put( "RAZAOEMP", Aplicativo.empresa.toString() );
hParam.put( "FILTROS", sCab );
Juros calcjuros = new Juros();
hParam.put( "CALCJUROS", calcjuros );
dlGr = new FPrinterJob( "layout/rel/REL_COB_01.jasper", "Relatório de cobrança", sCab, rs, hParam, this );
if ( bVisualizar==TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
try {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
} catch ( Exception err ) {
Funcoes.mensagemErro( this, "Erro na impressão do relatório de cobrança!" + err.getMessage(), true, con, err );
}
}
}
示例12: imprimiGrafico
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
private void imprimiGrafico( final ResultSet rs, final TYPE_PRINT bVisualizar ) {
FPrinterJob dlGr = null;
HashMap<String, Object> hParam = new HashMap<String, Object>();
hParam.put( "CODEMP", Aplicativo.iCodEmp );
hParam.put( "CODFILIAL", ListaCampos.getMasterFilial( "CPCOMPRA" ) );
hParam.put( "RAZAOEMP", Aplicativo.empresa.toString() );
hParam.put( "SUBREPORT_DIR", "org/freedom/relatorios/" );
hParam.put( "CODCLI", txtCodCli.getVlrInteger() );
hParam.put( "DTINI", txtDataini.getVlrDate() );
hParam.put( "DTFIM", txtDatafim.getVlrDate() );
hParam.put( "CODCONTR", txtCodContr.getVlrInteger() );
hParam.put( "CODITCONTR", txtCodItContr.getVlrInteger() );
hParam.put( "DESCCONTR", txtDescContr.getVlrString() );
hParam.put( "DESCITCONTR", txtDescItContr.getVlrString() );
hParam.put( "CONEXAO", con.getConnection() );
if ( txtCodCli.getVlrInteger().intValue() > 0 ) {
hParam.put( "CLIENTE", txtCodCli.getVlrString().trim() + "-" + txtRazCli.getVlrString().trim() );
dlGr = new FPrinterJob( "relatorios/atendimentos.jasper", "RELATÓRIO DE ATENDIMENTOS", "", rs, hParam, this );
}
else {
hParam.put( "CLIENTE", "DIVERSOS" );
dlGr = new FPrinterJob( "relatorios/atendimentos_cli.jasper", "RELATÓRIO DE ATENDIMENTOS", "", rs, hParam, this );
}
if ( bVisualizar==TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
try {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
} catch ( Exception err ) {
Funcoes.mensagemErro( tela, "Erro na impressão de relatório Compras Geral!" + err.getMessage(), true, con, err );
}
}
}
示例13: print
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
/**
*
*/
public void print() throws JRException
{
long start = System.currentTimeMillis();
JasperPrintManager.printReport("build/reports/MasterReport.jrprint", true);
System.err.println("Printing time : " + (System.currentTimeMillis() - start));
}
示例14: print
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
/**
*
*/
public void print() throws JRException
{
File[] files = getFiles(new File("build/reports"), "jrprint");
for(int i = 0; i < files.length; i++)
{
File reportFile = files[i];
long start = System.currentTimeMillis();
JasperPrintManager.printReport(
reportFile.getAbsolutePath(),
true
);
System.err.println("Report : " + reportFile + ". Printing time : " + (System.currentTimeMillis() - start));
}
}
示例15: imprimiGrafico
import net.sf.jasperreports.engine.JasperPrintManager; //导入方法依赖的package包/类
private void imprimiGrafico( final ResultSet rs, final TYPE_PRINT bVisualizar, StringBuilder sCab ) {
FPrinterJob dlGr = null;
HashMap<String, Object> hParam = new HashMap<String, Object>();
hParam.put( "CODEMP", Aplicativo.iCodEmp );
hParam.put( "CODFILIAL", ListaCampos.getMasterFilial( "CPCOMPRA" ) );
hParam.put( "RAZAOEMP", Aplicativo.empresa.toString() );
hParam.put( "SUBREPORT_DIR", "org/freedom/relatorios/" );
hParam.put( "DTINI", txtDataini.getVlrDate() );
hParam.put( "DTFIM", txtDatafim.getVlrDate() );
hParam.put( "CONEXAO", con.getConnection() );
if("R".equals( rgTipo.getVlrString() )) {
dlGr = new FPrinterJob( "layout/rel/REL_CRM_RESUMO_ATENDENTE_01.jasper", "Resumo de atendimentos por atendente (Resumido)", sCab.toString() , rs, hParam, this );
}
else if ("D".equals( rgTipo.getVlrString() )) {
dlGr = new FPrinterJob( "layout/rel/REL_CRM_DETALHAMENTO_ATENDENTE_01.jasper", "Resumo de atendimentos por atendente (Detalhado)", sCab.toString(), rs, hParam, this );
}
else if ("E".equals( rgTipo.getVlrString() )) {
dlGr = new FPrinterJob( "layout/rel/REL_CRM_RESUMO_ESPECIFICACAO_01.jasper", "Resumo de atendimentos por especificação", sCab.toString(), rs, hParam, this );
}
else if ("P".equals( rgTipo.getVlrString() )) {
dlGr = new FPrinterJob( "layout/rel/REL_CRM_RESUMO_PROJETO_01.jasper", "Resumo de atendimentos por projeto", sCab.toString(), rs, hParam, this );
}
if ( bVisualizar==TYPE_PRINT.VIEW ) {
dlGr.setVisible( true );
}
else {
try {
JasperPrintManager.printReport( dlGr.getRelatorio(), true );
} catch ( Exception err ) {
Funcoes.mensagemErro( this, "Erro na impressão de relatório resumo de atendimentos!" + err.getMessage(), true, con, err );
}
}
}