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

saman0suke

Members
  • Posts

    33
  • 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 saman0suke

  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
  16. Well, I don't have it with me right now but let me give you that information: document is String, so that's why I convert it to BigDecimal total is BigDecimal. I checked again and the problem is the style tags, because it's giving me all the time the: "Cannot cast from string to bigDecimal" like it's recognizing the tags as part of the value that is going to be entered into the Field. By the way the target Field is BigDecimal, because the $total is BigDecimal on the select, thanks!
  17. Hello, I need to print a horizontal line just when all the records from the main SELECT have been found, is there any way I can do it? thanks!!!
  18. I just changed the "Evaluation time" on the SUM field, from Page to Report, so now I can see the final total, and that's works, I still use the column footer because I need the summary to appear in a new page, and the idea of having the SUM field is to show it right after the main select with all the records finishes, I mean the table with the results, but I still have the problem that I'd prefer to have the final total printed only once when the table population is finished, can I do it? how? thanks! EDIT: I noticed that I can use "Print when expression" on ColumnFooter band to make it visible only when the main select finishes, but, I don't know how the expression could be written, any idea? I managed to make it work but in a non "correct" way, I made a little subreport that obtains the total number of rows found on the main query, I pass that value to the main report, and on the "print when expression" of Column footer I compare this vale being equal to $VREPORT_COUNT, and works in that way, but I know something better, I would appreciate it, thanks! Post Edited by saman0suke at 01/10/2011 06:13 Post Edited by saman0suke at 01/10/2011 07:10
  19. I will try it and post my results, but I guess that's it, because as you say, I have it configured to "page" instead of "report", once again, thanks a lot!!
  20. Hello, I'm trying to make a comparison here, so if the doc is equal to "1" it will print the result in a color, and if it's the other one, in a different one, but I'm getting this error: The left-hand side of the assignment must be a variable And here's the code: (new BigDecimal($F{document}).compareTo(new BigDecimal(1))=new BigDecimal(1)? "<style forecolor='#006633'>" + $F{total} + "</style>": (new BigDecimal($F{document}).compareTo(new BigDecimal(2))=new BigDecimal(2)? "<style forecolor='#ff0000'>" + $F{total} + "</style>": $F{total} )) Could you point me in the right direction? thanks! EDIT: I just found out that one of the problems lies here: "<style forecolor='#006633'>" + $F{total} + "</style>" ireport says that there's some incompatibility because I'm declaring "strings" and comparing BigDecimal, I managed to make it work, but without those tags, is there any way to solve it? thanks! Post Edited by saman0suke at 01/08/2011 17:53
  21. I have a problem, and I don't know what to do right now, the thing is that I'm using the TOTAL function on iReport 3.0.0 in order to sum the total of records from a query, this one is on the COLUMN FOOTER band, the thing is that, when the records uses more than one page, the total appears on page 1 and page 2, and on the first page only shows the sum of the records on that page and on the second one it shows the full total, I need to get rid of the total on page 1, since the only one I'm going to use is the one at the end, please, any advice will be great, thanks in advanced, have a nice day!!! Post Edited by saman0suke at 01/08/2011 06:56
  22. Well the problem is that I'm showing a general select from a table with documents on the DETAILS band, and on the SUMMARY, I want to show all those documents classified depending on a justification, it can be possible? and also, I notice that for each row on the DETAILS band, the report group its repeated as well, am I missing something? thanks. Post Edited by saman0suke at 01/07/2011 20:01
  23. You need to define the parameters on the main report, then right click on the subreport area (on the main report), on properties on Subreport(all), on subparameters tab, click on "Copy from master", then you need to define on the subreport, the same parameters you created on the main report, and that's it, when you run the main report is going to ask you for those parameters and the values will be send to them, good luck.
  24. Is there a way to insert a repor group into the summary band? I need to add a report group in a summary band where I have some subreports, because right now they are going to be printed above and under summary right? I'm currently using iReport 3.0.0, thanks in advanced, have a nice day.
  25. I'm using iReport 3.0.0(by the company's demand) and I don't see that option, I'm asuming is on the latest versions, right? thanks for the tip, I will look into that and post my results.
×
×
  • Create New...