Jump to content
JasperReports Library 7.0 is now available ×

saman0suke

Members
  • Posts

    33
  • Joined

  • Last visited

saman0suke's Achievements

Contributor

Contributor (5/14)

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

Recent Badges

0

Reputation

  1. Hello, I'm creating a report using iReports 3.7.6 and then converting it through jsp pages into excel format (xlsx), it's working fine ony my computer with Office 2010, but in some computers (not all) with Office 2007, when I select "OPEN" on the prompt asking you if you want to save it or open, it opens the report in excel format, and then opens the report a second time, so I receive two sheets of the same report, here's my code: JasperPrint jasperPrint; String xlsxFileName; ByteArrayOutputStream byteArrayOutputStream; JRXlsxExporter exporterXLSX; File newFile; FileInputStream inputStream; ServletOutputStream ouputStream; jasperPrint = JasperFillManager.fillReport(url_path + "docEmitidosValorizados.jasper", parameters, conn); xlsxFileName = "documentos_emitidos.xlsx"; byteArrayOutputStream = new ByteArrayOutputStream(); exporterXLSX = new JRXlsxExporter(); exporterXLSX.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporterXLSX.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, xlsxFileName); exporterXLSX.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE); exporterXLSX.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE); exporterXLSX.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, byteArrayOutputStream); exporterXLSX.exportReport(); response.setContentType ("application/vnd.ms-excel"); response.setHeader ("Content-Disposition", "attachment;filename=\"" + xlsxFileName + "\""); ouputStream = response.getOutputStream(); ouputStream.write(byteArrayOutputStream.toByteArray()); ouputStream.flush(); ouputStream.close(); byteArrayOutputStream.flush(); byteArrayOutputStream.close(); I don't know what's happening, could you help me please? as I said, it works with no problems on 2010, but on some computers with Office 2007, I'm getting the report twice on Office, when I select "OPEN" from the JSP page, thanks in advance!!
  2. Hello, I'm using iReport 3.7.6 and I exported a report to powerpoint format using JRPptxExporter, all the data is there, except for the borders around textfields, it's just blank, reading on the internet, a user advised that Powerpoint does not handle the code: <box> <topPen lineWidth="4" lineColor="red"/> <bottomPen lineWidth="4" lineColor="red"/> </box> etc, instead I need to define only one pen style, like this: <box> <pen lineWidth="4" lineColor="red"/> </box> As a single pen statement, but I'm not using all the borders in all the textfields, some of them have 2 or 3 according to the needed design, is there a way to get the borders without forcing the report to use all the borders in the fields? thanks in advanced, have a nice day!!
  3. Hello, I exported a report generated on iReport 3.7.6, in PDF, RTF, and Excel, the first two are identical, but the Excel one shows a larger font size and it unreadable into the cells, could you help me with this please? I cannot change the size and it's weird since the PDF and RTF reports just fine, any help would be appreciated, thanks!!!
  4. I know what the problem is, I was testing it on iReport, and it seems that when an element is "touching" another element, they cannot being displayed on excel format, maybe because if an element is over another one, would be like a cell over another cell in the excel format, is there something that I can do, as a programming code to avoid this at the moment of the export? because the solution would be redesign the report in order to avoid putting elements over the other ones but that would be really difficult since the report is really huge, any idea¡? thanks
  5. I'm converting a report that I created it on iReport 3.7.6, in Excel format, it shows the information, numbers etc,but the design is completely disordered, there are missing lines, some texts does not appear, so here's the code: jasperPrint = JasperFillManager.fillReport("C:/ProyectoEdmundo/EID/EID/public_html/verified_account/1/verifiedAccountRep.jasper", parameters, conn); xlsFileName = "report.xls"; byteArrayOutputStream = new ByteArrayOutputStream(); exporterXLS = new JRXlsExporter(); exporterXLS.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporterXLS.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, xlsFileName); exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE); exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, byteArrayOutputStream); exporterXLS.exportReport(); response.setContentType ("application/vnd.ms-excel"); response.setHeader ("Content-Disposition", "attachment;filename=\"" + xlsFileName + "\""); ouputStream = response.getOutputStream(); ouputStream.write(byteArrayOutputStream.toByteArray()); ouputStream.flush(); ouputStream.close(); byteArrayOutputStream.flush(); byteArrayOutputStream.close(); Is there anything I can do to get exactly the same report? the original report is filled with at least 5 subreports by the way, any help would be appreciated, thanks!!!
  6. Hello, I'm currently able to export the report on PDF, Excel and RTF, but I need to know if there's a way to export the report in Powerpoint format (PPT), is this possible at some point? I'm iReport 3.7.6 and POI to generate the exported reports, thanks in advanced! I was checking and ireport has an option to preview the document on Microsoft Powerpoint, if the app can do it, is there any chance that I can??? I'm assuming the application uses the same drivers right?? thanks! Post Edited by saman0suke at 05/26/2011 02:57
  7. Hello, I succesfully generate pdf reports with iReport 3.7.6, and I show a preview on my web app, however I'd like to know how to, instead of generating a pdf report, generate a docx or doc, excel report and save it in any location in the computer, this is how I'm doing it right now for pdf: byte[] bytes = JasperRunManager.runReportToPdf(reportFile.getPath (),parameters,conn); response.setContentType("application/pdf"); response.setContentLength(bytes.length); ServletOutputStream ouputStream = response.getOutputStream(); ouputStream.write(bytes, 0, bytes.length); ouputStream.flush(); ouputStream.close(); out.print("Ok"); How can I do it to save the file in a different format? thanks in advanced!!!
  8. I already start using the first option, since I got into the conclusion that, it's not possible as you say, thanks!
  9. Hi, I just created a dataset that returns a total number of documents created on a date range, but I would like to get the value from the dataset and put it on a textfield, so far, I know that you need to use the dataset on an element(chart, table, list, etc) But I want to use it on a textfield on the main report, is this possible? thanks in advanced have a nice day!!! I'm using iReport 3.7.6
  10. Hello, I have a problem , I'm using iReport 3.7.6, I setup a textfield with New Date() as expression, and the proper date format, it works fine in my computer( it is printed on Spanish, which is the language that I need), but when I run the report from a Red Hat Server, using GlassFish, the date appears in English, and I need it on Spanish, as it shows when I run it locally, is there any way that I can force the date to show only in Spanish? I would appreciate any help, thanks! UPDATE: I just got it ,sorry for the inconveniences, here is the sintax if someone need it: (new java.text.SimpleDateFormat("EEEEE dd MMMMM yyyy hh:mm aaa",new Locale("es", "ES"))).format(new Date()) Post Edited by saman0suke at 01/28/2011 17:34
  11. I recently upgraded from iReport 3.0.0 to iReport 3.7.6, I had to changed the iText.jar and jasperreports.jar to the latest version (3.7.6) to make it work, but the oldest reports are giving me this error: net.sf.jasperreports.engine.util.JRFontNotFoundException: Font '' is not available to the JVM. See the Javadoc for more details. Most of the new reports works with no problem except for the old ones.......I changed the parameter: net.sf.jasperreports.awt.ignore.missing.font true But I still receive the same error, I don't want to go back to old iReport and jasperreport version, is there anything else I need to do? thanks in advanced, have a nice day! UPDATE: I just managed to make it work, however, the solution is too complex, I checked the XML of the report and found this: <font fontName="" size="10" isBold="true" pdfFontName="Helvetica-Bold"/> I'm assuming that jasperreports.jar (version 3.0.0) was reading the pdfFontName value, which is deprecated now on the latest version, and that's why I get the error, because it finds nothing on the fontName tag, so i did this with all the empty tags: <font fontName="SansSerif" size="10" isBold="true" pdfFontName="Helvetica-Bold"/> and it worked!! but I cannot doing it manually since I have more than 10 reports, is there anything I can do to correct this? thanks!!! Post Edited by saman0suke at 01/15/2011 18:45
  12. Hello, now I have a PROBLEM, I was working all the time with iReport 3.0.0 at my job, but I decided to upgrade to 3.7.6, which is better, the reports works great on the appplication, when I try to execute them on my own application( java (jsp) language, and OCJ4 server, using jDevelopr) I receive this exception on the log: net.sf.jasperreports.engine.JRRuntimeException: Unknown hyperlink target 0 I checked on the web and it's supposed to be fixed when you add to the application proyect the jasperrreport3.7.6.jar instead of the old one(in my case jasperrepor3.5.3.jar) I did that and the old reports works but the new ones are not working yet, what else can I try? I need to fix this because I don't want to creat the reports again on the old version just to make it work, thanks in advanced, have a nice day :(
  13. Thanks, once again, you're saving my life hehe, I decided to put it on SUMMARY band, where it works fine ;)
  14. I'm just learning how to use the table element, since the way I create tables it's really hard (drawing lines on the field's corners) I think it's a good tool, but I don't know why, when the total of records finishes to be printed, it starts again on the report!! I've been trying to find some information about tables on the web but there's no accurate or detailed info, any help? or if you need a better way to put the data into a table I would appreciate it, thanks!! UPDATE: The table it's on the DETAIL band, where I intend to use it, but looking on one thread I found, it says that it is intented to be used only on SUMMARY band, why I cannot use it on DETAIL band? I suppose that SUMMARY band is only for summarized data, final results, etc, but this is 1 of 4 tables I need to present with different info, thanks! Post Edited by saman0suke at 01/14/2011 04:46 Post Edited by saman0suke at 01/14/2011 04:56
  15. I see, I will give it a try and see how it looks, maybe I'm just trying to use the hard way, thanks! UPDATE: It worked!! thank you, easy method! Post Edited by saman0suke at 01/11/2011 16:47 Post Edited by saman0suke at 01/11/2011 17:26
×
×
  • Create New...