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

mfirkser

Members
  • Posts

    55
  • Joined

  • Last visited

mfirkser's Achievements

Enthusiast

Enthusiast (6/14)

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

Recent Badges

0

Reputation

  1. Upon further research I have found an answer. It seems that the geniuses at Adobe put in a "feature" into version 10.0.3 in which it "intelligently" tries to detect if a signature is required. One of the ways it seems to "intelligently" do this is look for words or fields that contain the string "sign" or "signature". There is a way to disable this "feature", that involves the registry, but that means I won't see the signature field garbage, but my users will. I will put this on the list of "if you document a bug, you can call it a feature"
  2. I've created a report that produces a .pdf output. For for some unknown reason a banner appears which says "Signature field(s) detected". I did not intentionally add, nor do I want, any signature fields. In addition, I can't find anything in the jrxml or in iReport Designer that would infer a signature field. Can anybody offer any help on this? Thanks, Mike
  3. And where do we get this jasperreports-javaflow-x.y.z.jar ? I Google, Bing, and Yahoo the name, and I just get this page.
  4. Not sure if this will help, but I had problems with subreports rendering in a main report and this helped. In the main report, uncheck "Print when data overflows" for the subreport. Also, is it at the beginning or end of a group section? Check to see if you have the group (or the next group) start on a new page.
  5. I want to use a Comparator class to sort my report. I can write the Comparator class with no problem. My problem (and I have searched and searched this forum and the internet) is how to tell my report to use the Comparator. How does the report know to use the comparator? That is all I want to know. Thank you in advance.
  6. I have a report with sub reports. Now, all of a sudden when I run the reports in iReports, I get the following IOException with the explanation of "Access is denied". If I remove the subreport, the report works fine. I set and unset the readonly status of the subreport, and I still get the error. I've closed out iReports and reopened it, and I've rebooted my pc, but I still get this problem. Any help would be appreciated. Thanks, Mike Code:Error filling print... java.io.IOException: Access is denied net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: Access is denied     at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer.virtualizeData(JRAbstractLRUVirtualizer.java:535)     at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache$LRUScanMap.processRemovedLRU(JRAbstractLRUVirtualizer.java:134)     at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache$LRUScanMap.removeLRU(JRAbstractLRUVirtualizer.java:120)     at org.apache.commons.collections.LRUMap.put(LRUMap.java:122)     at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache.put(JRAbstractLRUVirtualizer.java:195)     at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer.registerObject(JRAbstractLRUVirtualizer.java:420)     at net.sf.jasperreports.engine.base.JRVirtualPrintPage.<init>(JRVirtualPrintPage.java:176)     at net.sf.jasperreports.engine.fill.JRBaseFiller.newPage(JRBaseFiller.java:1543)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.addPage(JRVerticalFiller.java:1847)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:357)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:263)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:129)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:903)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:813)     at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)     at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:878)     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: java.io.IOException: Access is denied     at java.io.WinNTFileSystem.createFileExclusively(Native Method)     at java.io.File.createNewFile(Unknown Source)     at net.sf.jasperreports.engine.fill.JRFileVirtualizer.pageOut(JRFileVirtualizer.java:113)     at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer.virtualizeData(JRAbstractLRUVirtualizer.java:530)     ... 19 moreÂ
  7. Will it be the same number of columns for every user? If so, maybe if you pass your user information to your database, and then have a function call the appropriate table. Have the values, no matter what the query used, labled as col1, col2, etc. Then have a function to dynamically generate your column headers.
  8. I'm currently implementing JasperReports into a J2EE Web Application. But I've run into a problem. I use a servlet to run reports, but if I call a report and close it (close the new window it is appearing in), before the report completes, I can't run any new reports, they just hang, and I have to restart my server. Annoying and time comsuming while developing, and will be unacceptable in production. Below is the code I use to call the report. Any help will be greatly appreciated. Code: public synchronized void createReport(JasperReportCreatorData jrcd) throws IOException { HttpSession session = jrcd.getRequest().getSession(); JRSwapFileVirtualizer virtualizer = null; Connection conn = null; JasperReport jasperReport = null; JasperPrint jasperPrint = null; boolean isPdf = false; boolean isXL = false; boolean isCSV = false; jrcd.getParameters().get(Reports.STD_REPORT_NAME); String formatType = (String) jrcd.getParameters().get(Reports.OUTPUT_FORMAT); if (formatType != null) { if (formatType.equals(Reports.OUTPUT_FORMAT_STANDARD)) { isPdf = true; } else if (formatType.equals(Reports.OUTPUT_FORMAT_EXPORT)) { isXL = true; } else if (formatType.equals("csv")) { isCSV = true; } else { System.out.println("bad file type"); } } int growthSize = 1024; int maxSize = growthSize * 2; long startTime = System.currentTimeMillis(); long readyToExport = 0L; ServletOutputStream sos = null; try { sos = jrcd.getResponse().getOutputStream(); // Put in this code to handle memory problems JRSwapFile swapfile = new JRSwapFile("tmp/", maxSize, growthSize); virtualizer = new JRSwapFileVirtualizer(50, swapfile, true); jrcd.getParameters().put(JRParameter.REPORT_VIRTUALIZER, virtualizer); // end of new code conn = OracleDAOFactory.getConnection(); jasperReport = JasperCompileManager.compileReport(jrcd.getInputFile()); jasperPrint = JasperFillManager.fillReport(jasperReport, jrcd.getParameters(), conn); System.gc(); if (isPdf) { JRPdfExporter exporter = new JRPdfExporter(); jrcd.getResponse().setContentType("application/pdf"); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, sos); exporter.setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint); exporter.exportReport(); } else if (isXL) { JRXlsExporter exporter = new JRXlsExporter(); jrcd.getResponse().setContentType("application/vnd.ms-excel"); String time = Long.toString(System.currentTimeMillis()); String disposition = "attachment; fileName=CDRSSReport" + time + ".xls"; jrcd.getResponse().setHeader("Content-Disposition", disposition); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, sos); exporter.setParameter(JRExporterParameter.JASPER_PRINT,jasperPrint); exporter.exportReport(); } else if (isCSV) { JRCsvExporter exporter = new JRCsvExporter(); jrcd.getResponse().setContentType("text/csv"); String disposition = "attachment; fileName=CDRSSReport" + time + ".csv"; jrcd.getResponse().setHeader("Content-Disposition", disposition); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, sos); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.exportReport(); } } catch (JRException e) { System.out.println(e.getClass().getName() + " Exception in JasperReportServlet 1"); printHeaderData(jrcd.getRequest()); e.printStackTrace(); session.setAttribute("ErrorInfo", new ReportErrorWrapper(e, jrcd.getParameters())); jrcd.getResponse().sendRedirect("/cdrss/reports/reportError.jsp"); } catch (OutOfMemoryError e) { System.out.println(e.getClass().getName() + " Exception in JasperReportServlet 2"); printHeaderData(jrcd.getRequest()); e.printStackTrace(); session.setAttribute("ErrorInfo", new ReportErrorWrapper( new CDRSException(CDRSErrorCodes.DEFAULT, e.toString()), jrcd.getParameters())); jrcd.getResponse().sendRedirect("/cdrss/reports/reportError.jsp"); } catch (IllegalStateException e) { System.out.println(e.getClass().getName() + " Exception in JasperReportServlet 3"); printHeaderData(jrcd.getRequest()); e.printStackTrace(); session.setAttribute("ErrorInfo", new ReportErrorWrapper(e, jrcd.getParameters())); jrcd.getResponse().sendRedirect("/cdrss/reports/reportError.jsp"); } catch (CDRSException e) { System.out.println(e.getClass().getName() + " Exception in JasperReportServlet 4"); printHeaderData(jrcd.getRequest()); e.printStackTrace(); session.setAttribute("ErrorInfo", new ReportErrorWrapper(e, jrcd.getParameters())); jrcd.getResponse().sendRedirect("/cdrss/reports/reportError.jsp"); } catch (ExceptionConverter e) { System.out.println(e.getClass().getName() + " Exception in JasperReportServlet 5"); printHeaderData(jrcd.getRequest()); e.printStackTrace(); session.setAttribute("ErrorInfo", new ReportErrorWrapper(e, jrcd.getParameters())); // res.sendRedirect("/cdrss/reports/reportError.jsp"); } catch (Exception e) { System.out.println(e.getClass().getName() + " Exception in JasperReportServlet 6"); printHeaderData(jrcd.getRequest()); if (!e.getClass().isInstance(new IOException())) { e.printStackTrace(); session.setAttribute("ErrorInfo", new ReportErrorWrapper(e, jrcd.getParameters())); jrcd.getResponse().sendRedirect("/cdrss/reports/reportError.jsp"); } else { System.out.println("throwing IOException"); } } finally { // virtualization.cleanup(); OracleDAOFactory.closeConnection(conn); try { sos.close(); } catch (IOException e) { System.out.println(e.getClass().getName() + " Exception in JasperReportServlet" + e.toString()); e.printStackTrace(); } if (virtualizer != null) { virtualizer.cleanup(); } } }
  9. Have you tried adding a No Data Section - which includes a message saying "No records found"? Code:<noData> <band height="276"> <textField> <reportElement positionType="Float" x="0" y="40" width="842" height="20"/> <textElement textAlignment="Center"> <font size="12" isBold="true"/> </textElement> <textFieldExpression><![CDATA["NO DATA RETURNED"]]></textFieldExpression> </textField> </band></noData>
  10. Turned out to be a problem with the JDBC Driver (only happened when using a Java Connection object) and using "deterministic" in the function call. Weird.
  11. I am sorting my results by a variable, but for some reason, the variable is not being calculated for the first record returned. Any ideas why this may be happening?
  12. Found the cause. It is due to a bug in Oracle, which limits rows returned when "deterministic" is used. It has been corrected by Oracle, but we're haven't updated to the newest version in all environments yet.
  13. I have a report that gets its data from an Oracle function. Here is the problem: when I don't add an Order by after the function call, I get only 10 records. When I do, I get all the records. Thanks in advance for any help. Mike Code:SELECT * from TABLE(cdrss_reports_jasper.getCaseStats( //all my paramters ) ) ORDER BY 2,3,4 // works with this in there
×
×
  • Create New...