-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi I have this code in my zul page:
...
report.setSrc("/WEB-INF/reportes/CalculoInteresOtraTasa.jasper");
report.setParameters(parameters);
report.setDataSource(new org.bcv.sace.FechaExclusionDataSource(resultado.getFechaExclusionList()));
report.setType("pdf");
And got this error:
GRAVE: >>org.zkoss.zk.ui.UiException: Sourced file: inline evaluation of: ``showPDF();'' :
Error in method invocation: Method setDataSource( org.bcv.sace.FechaExclusionDataSource ) not found in class'org.zkoss.zkex.zul.Jasperreport' :
at Line: 32 :
in file: inline evaluation of: ``import org.bcv.sace.FechaExclusionDataSource; . . . '' : report .setDataSource ( new org .bcv .sace .FechaExclusionDataSource ( resultado .getFechaExclusionList ( ) ) )
Called from method: showPDF : at Line: 1 : in file: inline evaluation of: ``showPDF();'' : showPDF ( )
>>Sourced file: inline evaluation of: ``showPDF();'' :
Error in method invocation: Method setDataSource( org.bcv.sace.FechaExclusionDataSource ) not found in class'org.zkoss.zkex.zul.Jasperreport' :
at Line: 32 : in file: inline evaluation of: ``import org.bcv.sace.FechaExclusionDataSource; . . . '' :
report .setDataSource ( new org .bcv .sace .FechaExclusionDataSource ( resultado .getFechaExclusionList ( ) ) )
>>
>>Called from method: showPDF : at Line: 1 : in file: inline evaluation of: ``showPDF();'' : showPDF ( )
>> at bsh.BSHMethodInvocation.eval(Unknown Source)
>> at bsh.BSHPrimaryExpression.eval(Unknown Source)
>> at bsh.BSHPrimaryExpression.eval(Unknown Source)
>>...
However when I try this code in java works well,
java.util.Map parameters = new java.util.HashMap();
parameters.put("tituloCalculoSerie", resultado.getTituloCalculoSerie());
parameters.put("tituloConceptoIndicador", resultado.getTituloConceptoIndicador());
parameters.put("tituloCalculoConcepto", resultado.getTituloCalculoConcepto());
parameters.put("FechaInicial", resultado.getFechaInicial());
parameters.put("FechaFinal", resultado.getFechaFinal());
parameters.put("Monto", resultado.getMonto());
org.zkoss.zkex.zul.Jasperreport report = (org.zkoss.zkex.zul.Jasperreport) this.resultadoWin.getFellow("report");
report.setSrc(!chkExclusiones.isChecked() ?
"/WEB-INF/reportes/CalculoInteresOtraTasa.jasper" :
"/WEB-INF/reportes/CalculoInteresOtraTasaExclusiones.jasper");
report.setParameters(parameters);
//dataSource = new FechaExclusionDataSource(resultado.getFechaExclusionList());
report.setDatasource(new org.bcv.sace.FechaExclusionDataSource(resultado.getFechaExclusionList()));
report.setType("pdf");
Any help ?
Man, you can believe what is the problem....
A typo...!
It is "setDatasource" instead of "setDataSource"
Asked: 2008-12-10 16:32:47 +0800
Seen: 388 times
Last updated: Dec 10 '08