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

ozwolverine

Members
  • Posts

    22
  • Joined

  • Last visited

ozwolverine's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. bklawans wrote: I'm at a loss as what could be going on here. I can compile the file you attached in a previous post without any trouble on my machine. Definitely something in your environment, but I'm not sure what. Do you have access to another system to test on? -Barry Hello Barry, I think your comment is very important, that means it must be a problem in my environment. - Is your java code equals as mine? I guess it is, - Should I upload my java class for you to test it? - What IDE are you using to compile the .jasper file from de Java class? - What is the configuration you have for locale, language, i18n, etc, in your system? - What OS are you using? I guess that if my environment settings are the main problem, all these information is very valuable to get a solution :-) Thanks a lot, Johnny
  2. ozwolverine wrote: Yep, I missed to tell you an important part of my environment, I deploy my applications under jboss-4.0.4.GA. I'm going to check if it has another jar inside its libs directories, but I don't think so. No matter that, I'm going to do other tests: I'm going to try to deploy my application under linux to see if theres any difference. [/ul] I set my environment under Linux, trying different configurations, UTF-8, ISO-8859-1, even I tryed compiling my project with a different IDE, JDeveloper 10g, but I didn't get any positive result :(. I'm going to make a small console app, to see if the problem is with my application server (jboss) [/ul] The tests I did on Linux where outside of any application server, it was just a simple java app, trying to load and compile my .jasper file, hoping that the problem was about my jboss app server, but after the test I know that is not the problem :( Do you, Alexander or Barry, have any other ideas? Thanks a lot for your usual help. Johnny P.S: Sorry about the delay, but I was totally busy, and couldn't get time to make the tests before.
  3. Hello code_slave, You have brought very good ideas on how to test and solve my problem. I will follow your suggestions and let you know the results. thanks a lot, Johnny
  4. Yep, I missed to tell you an important part of my environment, I deploy my applications under jboss-4.0.4.GA. I'm going to check if it has another jar inside its libs directories, but I don't think so. No matter that, I'm going to do other tests: I'm going to try to deploy my application under linux to see if theres any difference.[/ul] I'm going to make a small console app, to see if the problem is with my application server (jboss)[/ul] I will tell you the results. Thanks a lot, Johnny
  5. Hello code_slave, thanks for your answer. The problem is that I modified my SQL query to: SELECT NOMBRECOMPLETO_USUARIOEMPRESA, ID_USUARIOEMPRESA, EMAIL_USUARIOEMPRESA, RAZONSOCIAL_EMPRESA, ID_TIPOUSUARIO FROM usuarioEmpresa ue, Empresa e WHERE ue.NIT_EMPRESA = e.NIT_EMPRESA AND ue.FECHAREG_USUARIOEMPRESA between to_date($P{fechaInicial},'DD-MON-YY') and to_date($P{fechaFinal},'DD-MON-YY') Passing the parameters (fechaInicial and fechaFinal) as Strings, but I stil cannot get results, even if I have records in my db. Do you think I should change my db types from date to timestamp? Thanks a lot, Johnny
  6. Hello Alexander, I followed your suggestions but it didn't get any positive result. I removed all cdata sections as well as text in static text elements, but nothing new happened. I also try using both encodings from the iReport interface: UTF-8 and ISO-8859-1, but everything went the same :( I tried passing the jasper file in different ways to the compileReport method, the old way as a String with the full path, next as a FileInputStream, but with the second option the error message is just a bit different: 12:02:52,375 ERROR [ReporteUsuariosRegistradosFechaActualBean] net.sf.jasperreports.engine.JRException: Invalid byte 2 of 3-byte UTF-8 sequence. 12:02:52,375 INFO [ReporteUsuariosRegistradosFechaActualBean] Invalid byte 2 of 3-byte UTF-8 sequence. So I just kept with the original way, with a String. I tryed making a new report, with just a select to display only one column, the sentence is: select * from usuarioempresa Showing in the details section the ID of the user (usuarioempresa:id_usuarioempresa). I tryed with all options, UTF-8, ISO-8859-1, from iReports and from my web app, but the error keeps appearing in my app. But everything goes perfect in iReport. I was wondering if there's any way to set locale for the report programmatically, the question is because I saw that in iReport console I have this output: Compiling to file... .prueba.jasper -> C:Program FilesJasperSoftiReport-1.2.5prueba.java it.businesslogic.ireport.ReportClassLoader@b0f6ef Compilation running time : 109 Filling report... Locale: español (Colombia) Time zone: default Report fill running time : 47 (pages generated: 1) Exporting xls to file (using POI)... .prueba.xls Export running time : 31 Executing: C:Program FilesOpenOffice.org 2.0programscalc.exe .prueba.xls And as you can see, I don't know how, but iReport compiles ok, and pass a Locale and a Time Zone options to the filling of the report. So I was thinking the problem starts there, but I don't know, because locale setting goes after compilation, or at least that is what the console says. What do you think? Thanks a lot, Johnny I was writting this message the I accidentaly pressed my navigator back button and I lost everything. So I had to rewrite it all.
  7. Sorry, I keep getting the same error message: 20:33:55,683 ERROR [ReporteUsuariosRegistradosBean] net.sf.jasperreports.engine.JRException: Invalid byte 1 of 1-byte UTF-8 sequence. 20:33:55,683 INFO [ReporteUsuariosRegistradosBean] Invalid byte 1 of 1-byte UTF-8 sequence. I thought It could be because I have my eclipse 3.1.2 configured to use ISO-8859-1, so I changed the encoding in Eclipse, but I have the same problem :( I have no clues about this. Thanks for your help, Johnny
  8. Thanks Barry and Alexander,.. I will do what Barry says, Hope to have good news soon. Let's see if this is a bug or just a misconfigured environment. BTW, my environment is: Windows XP Media Center SP2 jdk-1.5.0_06 Eclipse 3.1.2 iReport 1.2.3 and 1.2.5 Jassper Reports 1.2.5 Web app with: JSF EJB3 Jboss-4.0.4.GA Am I missing something? :) Thanks a lot for you interest, Johnny
  9. Hello, this is the jrxml file, once I changed the encoding from utf-8 to iso-8859-1 using: ( Edit, Report Properties, i18n ), the accents (from my mother language, spanish) I had in my report. I created the report with ireport 1.2.3, but I last saved with 1.2.5. thanks a lot, Johnny [file name=UsuariosRegistradosFechas.jrxml size=14940]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/UsuariosRegistradosFechas.jrxml[/file]
  10. But do you think, this is really encoding related problem? I mean, I changed the encoding manually, and as you said it is changed back automatically to UTF-8, so I changed the encoding through iReport to ISO-8859-1, but I'm having the same problem. So I guess that must be some kind of bug. Do you know what could be causing the problem? Thanks, Johnny
  11. I started to make my reports with iReport-1.2.3, as well as my implementation in java with jasperreports-1.2.0. Then someone gave me some advice on how to export to csv, and he told me about to use a specific class but that class wasn't in those versions I was working on, so I downloaded the last version for iReport (1.2.5) and jasperreports (1.2.5), after that, I was able to follow his instructions to export the report to cvs, but on the first stage (compilation of the report .jasper), I got the mentioned error message. I read some forum messages and they talked about changing enconding from UTF-8 to ISO-8859-1, but that didn't work either. So now I don't know what could the problem be. Your help would be very appreciated :) thanks a lot, Johnny
  12. Hello everybody, I'm having this error message when I try to compile my report :(, the error message is: net.sf.jasperreports.engine.JRException: Invalid byte 1 of 1-byte UTF-8 sequence. What could this means? I have found a couple of messages in the forum with the same subject, but some of them talk about changing encoding to ISO-8859-1, but that doesn't solve the problem. Does anyone know what to do? Thanks a lot, Johnny
  13. Hello Alexander, thanks for your answer. So, What I have to load is the .jasper file instead of the .jrxml, right? Thanks again, Johnny
  14. Hello, After watching the examples, I have done this code to run and export my report, but it is throwing this exception: net.sf.jasperreports.engine.JRException: Error loading object from file : c:tmpreportesSECReporteUsuariosRegistrados.jrxml my procedure is: Code: try { NOM_ARCHIVO=PropiedadesSistema.HOME_RUTA_REPORTES +"ReporteUsuariosRegistrados.jrxml"; // NOM_ARCHIVO = rutaReportesBIRT + "WebappReport.jrxml"; System.out.println("Inicia Proceso CSV"«»); System.out.println("Archivo fuente: " +NOM_ARCHIVO); //COmpilar Reporte JasperCompileManager.compileReportToFile( NOM_ARCHIVO ); //Llenar Reporte JasperFillManager.fillReportToFile(NOM_ARCHIVO, parametros, getConnection()); //Exportar Reporte a CSV File sourceFile = new File( NOM_ARCHIVO ); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"«»); System.out.println("Archivo XLS de salida: " + destFile.toString()); JRXlsExporter exporter = new JRXlsExporter(); // exporter.setParameters ( ) ; exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString()); exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporter.exportReport(); FileInputStream fileInputStream = new FileInputStream( destFile ); int tam = fileInputStream.available(); byte[] bytesXLS = new byte[tam]; fileInputStream.read( bytesXLS ); fileInputStream.close(); long time = System.currentTimeMillis(); UtilidadesSEC.descargarArchivo( bytesXLS, "reporteUsuariosRegistrados" + time+ ".pdf" ); // JasperRunManager.runReportToPdfFile(NOM_ARCHIVO, archivoPDF, parametros, new JREmptyDataSource()); } catch (JRException e) { logger.error( e ); logger.info( e.getMessage() ); request.setAttribute( "errores", e.getMessage() ); return ""; } What should be the problem? I'm sure the file is in the suggested location. What could the problem be? I'm attaching the report file. [file name=ReporteUsuariosRegistrados.jrxml size=12491]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/ReporteUsuariosRegistrados.jrxml[/file] Post edited by: ozwolverine, at: 2006/08/31 05:43
  15. Thanks a lot Alexander, I will follow the three step procedure you have just told me, hope to post good news here :-) Thanks, Johnny
×
×
  • Create New...