Jump to content
We've recently updated our Privacy Statement, available here ×

aggelos

Members
  • Posts

    27
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by aggelos

  1. Hi all, i'm trying to run a qry using "IN" operator.. this sentence is like (a,b) IN $P{param} and param is a String type...but when i'm trying to read fields in iReport it shows to me the message "Error: SQL problems: ORA-00920: invalid relational operator" but if i replace $P{param} with ((1,2)) it works ok....the problem is that i need that those values are dinamically passed throught a web app... PLEASE someone help me!!!! THX VC
  2. i can do it by myself...it just have to change the property Position Type to Float...BYE
  3. hi all... i made 3 reports, two are called as subreports in one main report. Every subreport return many rows...there's anyway to print one subreport after the other one, without mattering the number of rows every subreport return? Thanks a lot Viviana
  4. I made the same question longtime ago and nobody told me anything...so i just did: 1. i made a different report for every sheet i want in my final file. 2. fill independently every report 3. Remove every page of every report and then i add them to one report 4. Export this only report to xls and thats all... this is an example: Steps 1 and 2: JasperPrint jp_CPU = JasperFillManager.fillReport(ruta + cpu, parameters, con); JasperPrint jp_RED = JasperFillManager.fillReport(ruta + red, parameters, con); Steps 3: for (int cont = 0; cont < pag_red; cont++) { jp_CPU.addPage(i, (JRPrintPage)l.get(cont)); i = i + 1; } Step 4: JRXlsExporter exporter = new JRXlsExporter(); exporter.setParameter(JRXlsExporterParameter. IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp_CPU); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString()); exporter.exportReport(); i don't know if there are a better way to do this...but it works to me... i hope it helps u ;) Viviana
  5. Hi all, i have done 7 reports, in java i fill them and then i remove every page of every report and then i add them into one report but in differents sheets, the porblem is that when a run the web app all reports are mixing in one excel sheet and i don't know what else to do... this is my code: JasperPrint jp_CPU = JasperFillManager.fillReport(ruta +cpu, parameters, con); JasperPrint jp_RED = JasperFillManager.fillReport(ruta +red, parameters, con); if (jp_RED.getPages().size() > 0) { jp_CPU.addPage(i, jp_RED.removePage(0)); i = i + 1; } exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp_CPU); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString()); exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporter.exportReport(); Does any body know what am i doing bad? THANX A LOT
  6. hi i made a report with subreports in it in iReport an when i compiled this and exceuted this everythin it´s ok, but when a export this in a web app the report i got two problems: 1. the report broke into two excel Sheets 2. When the subreports returns a value, it insert an empty row in the excel Sheet ...how can i fixed if? Thanks a lot
  7. hi rsilver@bfm.bm, it works ok...THANKS a lot, BYE
  8. Hi All, i'm trying to export a report to xml and html in a web app, when i compile and execute my app in a tomcat 5.5 version and a oracle client 10g version instaled in my pc it's working ok but when i upload into a server whit a tomcat 5.0 version and the local oracle databese instaled, this error is produced when i tray to export a report to html and xls: 2006-10-26 10:22:26 StandardWrapperValve[reporte_excel]: Servlet.service() for s ervlet reporte_excel threw exception java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:140) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi ronment.java:62) at net.sf.jasperreports.engine.util.JRGraphEnvInitializer.initializeGrap hEnv(JRGraphEnvInitializer.java:58) at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.jav a:311) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFi ller.java:92) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFi ller.java:74) at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java: 147) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57 ) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillMa nager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillMa nager.java:234) at interfaz.Reporte_Excel.doGet(Reporte_Excel.java:92) at interfaz.Reporte_Excel.doPost(Reporte_Excel.java:170) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillMa nager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillMa nager.java:234) at interfaz.Reporte_Excel.doGet(Reporte_Excel.java:92) at interfaz.Reporte_Excel.doPost(Reporte_Excel.java:170) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:157) icationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.ja at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv eContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard ContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.ja at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv this is my code: String cpu = "Reporte_Excel.jasper"; // Reporteador de PC's String red = "Reporte_Red.jasper"; // Reporteador Equipos RED String ups = "Reporte_UPS.jasper"; // Reporteador de UPS's String pt = "Reporte_PT.jasper"; // Reporteador Plantas Tel. String base = "Reporte_Base.jasper"; // Reporteador Base Cargador String cargador = "Reporte_Cargador.jasper"; // Reporteador de Cargador String bateria = "Reporte_Bateria.jasper"; // Reporteador de Baterias String usr = (String) request.getSession(false).getAttribute( "usr"); String pass = (String) request.getSession(false).getAttribute( "pwd"); ruta = (String) request.getParameter("ruta") + "/"; try { Connection con = Persistencia.getInstance().demeConexion(usr, pass); Map parameters = new HashMap(); //Parámetros del Reporte parameters.put("SUBREPORT_DIR", ruta); /* Insertar los Datos en los reportes -----NEXT LINE IS LINE 92 ------*/ JasperPrint jp_CPU = JasperFillManager.fillReport(ruta + cpu, parameters, con); JasperPrint jp_RED = JasperFillManager.fillReport(ruta + red, parameters, con); JasperPrint jp_UPS = JasperFillManager.fillReport(ruta + ups, parameters, con); JasperPrint jp_PT = JasperFillManager.fillReport(ruta + pt, parameters, con); JasperPrint jp_BASE = JasperFillManager.fillReport(ruta + base, parameters, con); JasperPrint jp_CARGADOR = JasperFillManager.fillReport(ruta + cargador, parameters, con); JasperPrint jp_BATERIA = JasperFillManager.fillReport(ruta + bateria, parameters, con); File destFile = new File(ruta, "Listado de Equipos.xls"); JRXlsExporter exporter = new JRXlsExporter(); /* Insertar las paginas de los reportes en un solo archivo xls */ int i = 1; if (jp_RED.getPages().size() > 0) { jp_CPU.addPage(i, jp_RED.removePage(0)); i = i + 1; } if (jp_UPS.getPages().size() > 0) { jp_CPU.addPage(i, jp_UPS.removePage(0)); i = i + 1; } if (jp_PT.getPages().size() > 0) { jp_CPU.addPage(i, jp_PT.removePage(0)); i = i + 1; } if (jp_BASE.getPages().size() > 0) { jp_CPU.addPage(i, jp_BASE.removePage(0)); i = i + 1; } if (jp_CARGADOR.getPages().size() > 0) { jp_CPU.addPage(i, jp_CARGADOR.removePage(0)); i = i + 1; } if (jp_BATERIA.getPages().size() > 0) { jp_CPU.addPage(i, jp_BATERIA.removePage(0)); i = i + 1; } exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp_CPU); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString()); exporter.setParameter(JRXlsExporterParameter. IS_ONE_PAGE_PER_SHEET, Boolean.TRUE); exporter.exportReport(); please...i really need help.... THANKS A LOT Viviana
  9. Hi rsilver, i'm following the same steps showed in the sun web, here is the url http://java.sun.com/developer/technicalArticles/Security/Signed/ ... it's very similar to your steps, but i really don't understand where i give the rigth permissions to a specific file.... i really, really appreciate ur help THANKS a LOT Viviana
  10. Hi rsilver, Thanks again for ur help :blush: ... I really like ur option and i implemmented it in my project, then i signed the applet like this: jar cvf imprimir.jar *.class keytool -genkey -alias signFiles -keystore appletstore -keypass XXX -dname "cn=echarry" -storepass XXX jarsigner -keystore appletstore -storepass XXX -keypass XXX -signedjar impresion.jar imprimir.jar signFiles keytool -export -keystore appletstore -storepass XXX -alias signFiles -file AppletImpresion.cer keytool -import -alias viviana -file AppletImpresion.cer -keystore raystore -storepass viviana and finylly i modified the .java.policy file with: keystore "\C:\Documents and Settings\echarry.YCSA\jbproject\Applet\arte\applets\raystore"; grant signedBy "viviana", codeBase "fiel:{tomcat.home}/arte/applets"{ permission java.io.FilePermission "reportes/*","read"; }; but when i try the applet, it still shows me de message : java.security.AccessControlException: access denied (java.io.FilePermission arteappletsreportesComputador.jasper read) Do u know how can i configure my .java.policy correctly?:S THANKS A LOT, Viviana rsilver@bfm.bm wrote: I havn't loaded the report from within a jar file yet, although I am sure there is some mechanism to do so. However, another option is to place the .jrxml file in the same folder on your web server as your APPLET jar... and then in the applet class you can call the getCodeBase() method which will return that folder as a URL. Then append the filename to it and it should work.:blush:
  11. Hi all, First of all, rsilver thanks for ur help, it was just on time... well, now i have other problem... When i want to print, i do the following steps: 1. Load the .jasper report 2. Fill the report 3. print but when i try to load the .jasper, it returns me null. I tryed to insert the .jasper file in the .jar and put it in the applet package, but nothing works... please, Does any body knows how can i solve it? :( Thanks, Viviana
  12. hi all, i'm programming a web app that shows a jasperreport in a jsp code and it has an option to print that report showing to the user the print dialog, so i programmed that the print button was an applet and the print dialog arise at the client and not in the server side. until here everethig is ok and all sounds good but when i'm trying to sign the applet to access to the .jrprint from the jasper report and trying to print i jave to sent to the applet two .jar's files: one to the jasper library and the other to the applet certification. Does any body knwos how can i sen two .jar's to the same applet? i really apreciate if someone can takes a minute to help me with this problem. Thanks a lot, Viviana
  13. Hi all, i have a little problem with a web application. I have created a jsp that shows a report and it has a applet button to print the report that display the validation to print. The button is showed, but whe i push it, nothig happend... this is the jsp code: <%-- /* * Nombre de la clase: HojaDeVida.jsp * * Descripción: Interfaz Gráfica de la consulta del historial de un Equipo * * Información de la versión: 1.0 * * Fecha de creación: 2 de Junio de 2006 * * Autor de la clase: Elsa Viviana Charry Lopez * * Fecha de modificación: 21 de Julio de 2006 * * Autor de la modificación: Elsa Viviana Charry Lopez */ --%> <%@ page import="net.sf.jasperreports.view.JasperViewer" %> <%@ page import="net.sf.jasperreports.j2ee.servlets.ImageServlet" %> <%@ page import="net.sf.jasperreports.engine.export.JRHtmlExporter" %> <%@ page import="net.sf.jasperreports.engine.export.JRHtmlExporterParameter" %> <%@ page import="net.sf.jasperreports.engine.util.JRLoader" %> <%@ page import="net.sf.jasperreports.engine.JasperPrint" %> <%@ page import="net.sf.jasperreports.engine.JRRuntimeException" %> <%@ page import="net.sf.jasperreports.engine.JasperPrintManager" %> <%@ page import="net.sf.jasperreports.engine.JasperReport" %> <%@ page import="net.sf.jasperreports.engine.JRException" %> <%@ page import="net.sf.jasperreports.engine.JasperFillManager" %> <%@ page import="net.sf.jasperreports.engine.JRExporterParameter" %> <%@ page import="java.math.BigDecimal" %> <%@ page import="java.util.HashMap" %> <%@ page import="java.util.Map" %> <%@ page import="persistencia.Persistencia" %> <%@ page import="java.sql.Connection" %> <%@ page import="java.io.File" %> <%@ page import="java.sql.Connection"%> <%-- /** * Método que se encarga de crear el reporte de un Equipo específico */ --%> <% String archivo = "reportes/"; int t = 1; if ((t == 1) | (t == 22) | (t == 23)) archivo += "Computador.jasper"; else if ((t == 2) | (t == 3) | (t == 4) | (t == 5) | (t == 6) | (t == 7) | (t == 8) | (t == 9) | (t == 10) | (t == 11)) archivo += "Red.jasper"; else if ((t == 12) | (t == 13)) archivo += "UPS_PT.jasper"; else if (t == 14) archivo += "Bateria.jasper"; else if (t == 15) archivo += "Cargador.jasper"; else if (t == 16) archivo += "HandHeld.jasper"; else if (t == 17) archivo += "Lector.jasper"; else if (t == 20) archivo += "Base_Cargador.jasper"; File reportFile = new File(application.getRealPath(archivo)); if (!reportFile.exists()) throw new JRRuntimeException("Error al Cargar el reporte"); JasperReport jasperReport = (JasperReport)JRLoader.loadObject( reportFile.getPath()); Map parametros = new HashMap(); int tipo_Equipo = 1; String n_Equipo = "2"; String usr = ""; String pass = ""; String valor = "1"; String iva = "1"; Connection con = Persistencia.getInstance().demeConexion(usr, pass); parametros.put("NUMERO" , n_Equipo); parametros.put("tipo" , new BigDecimal(tipo_Equipo)); parametros.put("valor" , valor); parametros.put("iva" , iva); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parametros, con); JRHtmlExporter exporter = new JRHtmlExporter(); JasperFillManager.fillReportToFile(reportFile.getPath(), parametros, con); session.setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, jasperPrint); StringBuffer sbuffer = new StringBuffer(); exporter.setParameter(JRExporterParameter.JASPER_PRINT , jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER , out); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "interfaz/image?image="); exporter.exportReport(); %> <html> <script language="JavaScript" type="text/JavaScript"> <%-- /** * Método que se encarga de hacer el direccionamiento al jsp indicado */ --%> function menu(){ document.form.action = "menuPrincipal.jsp"; document.form.submit(); } <%-- /** * Método que se encarga de hacer el direccionamiento al Servlet de * modificación */ --%> function modificar(){ document.form.action = "/arte/hojadevida"; document.form.submit(); } </script> <body background="imagenes/BD21531_.jpg"> <form name="form" method="POST"> <%-- // Campo Oculto que contiene el Tipo de Equipo --%> <input type="hidden" name="tipo" value="<%= request.getAttribute("tipo") %>"> <%-- // Campo Oculto que contiene el Número del Equipo --%> <input type="hidden" name="n_Equipo" value="<%= request.getAttribute("numero") %>"> <%-- // Campo Oculto que contiene el tipo de Adquisición del Equipo --%> <input type="hidden" name="adquisicion" value="<%= request.getAttribute("adquisicion") %>"> <%=sbuffer.toString()%> <%--// Mostrar el Reporte --%> <br> <p align="right"> <input type="button" value="Aceptar" onclick="javascript:menu();"> <input type="submit" value="Modificar" onclick="javascript:modificar();"> <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" hspace="0" vspace="0" WIDTH = "140" HEIGHT = "32" codetype="application/java" align="middle"> <PARAM NAME = "code" VALUE = "Imprimir.class" > <PARAM NAME = "codebase" VALUE = "applets" > <PARAM NAME = "archive" VALUE = "jasperreports-1.2.5.jar" > <PARAM NAME = "type" VALUE="application/x-java-applet;version=1.2.5"> <param name = "Tipo_Reporte" value = "Computador"> <EMBED type="application/x-java-applet;version=1.1.2" CODE = "Imprimir.class" CODEBASE = "applets" ARCHIVE = "jasperreports-1.2.5.jar" WIDTH = "140" hspace = "0" vspace = "0" HEIGHT = "32" pluginspage="http://java.sun.com/products/plugin/1.1.2/plugin-install.html"> </EMBED> </object> </p> </form> </body> </html> and this is the applet.java code: /* * Nombre de la clase: Imprimir * * Descripción: Applet que maneja la impresion de un Reporte * * Información de la versión: 1.0 * * Fecha de creación: 18 de Septiembre de 2006 * * Autor de la clase: Elsa Viviana Charry Lopez * * Fecha de modificación * * Autor de la modificación */ //============================================================================== // BIBLIOTECAS REQUERIDAS //============================================================================== import javax.swing.JApplet; import javax.swing.JButton; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.util.JRLoader; import net.sf.jasperreports.engine.JasperPrintManager; import java.io.StringWriter; import java.io.PrintWriter; import javax.swing.JOptionPane; //============================================================================== // CLASE Imprimir //============================================================================== public class Imprimir extends JApplet { //------------------------------------------------------------------------------ // ATRIBUTOS DE INSTANCIA //------------------------------------------------------------------------------ /* Tipo del Reporte a Imprimir */ String reporte; //------------------------------------------------------------------------------ // METODOS CONSTRUCTORES //------------------------------------------------------------------------------ /** * Metodo Constructor de la Clase Imprimir que inicializa los componenetes * que van a ir en el applet. **/ public Imprimir() { } //------------------------------------------------------------------------------ // METODOS MODIFICADORES //------------------------------------------------------------------------------ //Initialize the applet public void init() { reporte = "Computador";//"Computador";// initComponents(); } /** * Método que Inicializa los componentes */ private void initComponents() { JButton boton = new JButton(); boton.setText("Imprimir Reporte"); boton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnPrintActionPerformed(evt); } }); getContentPane().add(boton); } /** * Método que ejecuta la acción al presionar el botón de Impresión * @param evt ActionEvent */ protected void btnPrintActionPerformed(java.awt.event.ActionEvent evt) { final String sourceFile = "C:\Documents and Settings\echarry.YCSA\" + "jbproject\ARTE\arte\reportes\" + reporte + ".jrprint"; try { Thread thread = new Thread( new Runnable() { public void run() { try { JasperPrint jasperPrint = (JasperPrint) JRLoader. loadObject(sourceFile); JasperPrintManager.printReport(jasperPrint, true); } catch (Exception e) { e.printStackTrace(); StringWriter swriter = new StringWriter(); PrintWriter pwriter = new PrintWriter(swriter); e.printStackTrace(pwriter); JOptionPane.showMessageDialog(null, swriter.toString()); } } } ); thread.start(); } catch (Exception e) { e.printStackTrace(); } } } Please, if some one knows how can i solve this problem, i'll apreciate ur help!"!!! Thanks a lot
  14. i forgot to tell u that i don´t have a servlets/image directory...but i didn't see it in the webapp sample...for that reason i didn't create that...does it the problem? how can i solve it? Viviana
  15. u r talking about this line: exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI , "servlets/image?image="); ? in the webapp sample is ../servlest...but i configured my webmodule without this...for example if i have a directory named jsp in the web module i accessed to it like jsp/X.jsp an not like ../jsp/X.jsp...so i just remove the "../" at the beginning ... but it doesn't work...:( i really don't knwo how to solve it...please help me... Thanks, Viviana
  16. hi, i'm doing a web application and a have to do a report, so i look the webapp sample and it was very usefull, but when i try to run it into the internet explore seems like the athchment, all the images are break...how can i solve this? :unsure: this is teh code: File reportFile = new File(application.getRealPath(archivo)); if (!reportFile.exists()) throw new JRRuntimeException("Error al Cargar el reporte"); JasperReport jasperReport = (JasperReport)JRLoader.loadObject( reportFile.getPath()); Map parametros = new HashMap(); int tipo_Equipo = ((Integer) request.getAttribute("t_Equipo")).intValue(); String n_Equipo = (String)request.getAttribute("n_Equipo"); String usr = (String) request.getSession(false).getAttribute("usr"); String pass = (String) request.getSession(false).getAttribute("pwd"); String valor = (String)request.getAttribute("valor"); String iva = (String)request.getAttribute("iva"); Connection con = Persistencia.getInstance().demeConexion(usr, pass); parametros.put("NUMERO" , n_Equipo); parametros.put("tipo" , new BigDecimal(tipo_Equipo)); parametros.put("valor" , valor); parametros.put("iva" , iva); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parametros, con); JRHtmlExporter exporter = new JRHtmlExporter(); session.setAttribute("reporte", jasperPrint); session.setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE, jasperPrint); StringBuffer sbuffer = new StringBuffer(); exporter.setParameter(JRExporterParameter.JASPER_PRINT , jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER , out); exporter.setParameter(JRExporterParameter.OUTPUT_STRING_BUFFER, sbuffer); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI , "servlets/image?image="); exporter.exportReport(); PLEASE...HELP ME...IT'S VERY URGENT:pinch: THANKS, Viviana
  17. if someone more needs it I could solve it by myself. first i create a report for every page that i want to include in the same xls, then I compiled and filled each report and finally i remove every page of all the reports and add those to the master report. ie: JasperPrint jp_CPU = JasperFillManager.fillReport (file.jasper, parameters, connection); JasperPrint jp_RED = JasperFillManager.fillReport(file2.jasper, parameters, connection); jp_CPU.addPage(1, jp_RED.removePage(0)); it woks very goog but I don't know if there be a better form to do it, if there is it please notify me. Thanks, Viviana
  18. if someone more needs it I could solve it by myself. I just create a servlet and in its post method after i just compiled, filled and run, the report i did: OutputStream out = response.getOutputStream(); File xls = new File(fileName); InputStream in = new FileInputStream(xls); HSSFWorkbook wb = new HSSFWorkbook(in); response.setContentType("application/vnd.ms-excel"); wb.write(out); out.flush(); it woks very goog but I don't know if there be a better form to do it, if there is it please notify me. Thanks, Viviana
  19. Hi, i'm programming a web application and i have to show a xls report to the user ...i just create the report and it's working ok...but i don't know how to show the xls file created by jasper. please...somebody knows how can i do that? Thanks, Viviana
  20. Hi, I'm trying to create a report in iReport to export to JXL format but i don't know how to insert a new page into the same report Does any body kwnos how can i do that? :blink: Thanks a lot, Viviana
  21. aggelos

    Jrprint

    hi, Some one can help me to create a jrprint....i compiled the crosstabs reports sample that is include in the project but when i try to build it with ant, it shows me this message C:jasperreports-1.2.5demosamplescrosstabs>ant jxl Buildfile: build.xml jxl: [java] java.io.FileNotFoundException: OrdersReport.jrprint [java] at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader .java:75) [java] at CrosstabApp.main(CrosstabApp.java:210) [java] NESTED BY : [java] java.io.FileNotFoundException: OrdersReport.jrprint [java] at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader .java:75) [java] at CrosstabApp.main(CrosstabApp.java:210) [java] NESTED BY : [java] net.sf.jasperreports.engine.JRException: OrdersReport.jrprint [java] at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader .java:75) [java] at CrosstabApp.main(CrosstabApp.java:210) [java] Caused by: java.io.FileNotFoundException: OrdersReport.jrprint [java] ... 2 more [java] Java Result: 1 BUILD SUCCESSFUL to export a report to jxl from a web application, i have to create this jrprint file? :unsure: Thanks a lot Viviana
  22. Hi, Does any body kwnos how can i insert a new sheet in a jxl report when i'm just creating it in iReport? :blush:
  23. aggelos

    Excel

    look the sample dir of the project...there are many examples to do that
×
×
  • Create New...