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

mfirkser

Members
  • Posts

    55
  • 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

Posts posted by mfirkser

  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. 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.

  4. 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.

  5.  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 
  6.  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.

  7. 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();            }        }    }
  8. 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>
  9.  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
  10. I'm creating a report which the values may need to be sorted by numbers that are returned as text.  For example, the values are

    Age 0 to 4
    Age 5 to 9
    Age 10 to 20

    Just letting Jasper sort these as text would mean the last two would be switched, so I need to create a class that implements Comparator .  

    No problem with that, but how do I get Jasper to call this class?

    I assume this is very basic, but I'm new to using Jasper, having recently escaped from the evil clutches of Crustal Reports.

    Thanks in advance for any help.

    Mike

  11.  I'm banging my head on this one.  I'm trying to pass a java.util.List obect to an Oracle function.

    I try creating a list like this:

    java.util.Arrays.asList({  9502,   9498,   9499,   9501,   9503  }) 

    and when I try to run it, I get "Parameter type not supported in query : dis_id java.util.List"

    I also have tried to use a oracle.sql.ARRAY, and that doesn't work either.

    I can get $X() working if I use a traditional query, but I need it to work with an Oracle function.

    Thanks in advance for any help.

     

    Mike

  12.  I see that Jasper Report 4.1.1 is out (downloaded it when I downloaded the new iReport) - does anybody know where the API documentation can be found.  

    Was JasperFillManager.fillReport() changed.  With the new version, I'm getting not applicable for arguments (JasperReport, map, Connection).  

    Thanks in advance for any help.

  13.  Is there a way to sort the results after they are received or by a variable that is calculated in Jasper?

    My query returns data sorted by age, and then county.  I then create a variable for age range, and group by that.  But within each group I then want them sorted by county.  I hope the following explains:

    What is returned from db:

    • Age 8 - Warren County
    • Age 9 - Morris County
    • Age 11 - Sussex County

    All of these are in the 0 - 14 age category, so that is the way they will be listed in the group.  What I want is:

    • Age 9 - Morris County
    • Age 11 - Sussex County.
    • Age 8 - Warren County

    Thanks in advance for any help.

    Mike

     

  14. The subreports are part of the parameters.  I put the page break in with "Float" for position, and it sort of works right.  The parameters are on a different page, but then a portion of the parameters page is also put on the page with the rest of the data.

    I think I'll just put all the stuff on one page.  If I wanted all this aggravation, I would stick with Crystal. 

×
×
  • Create New...