Jump to content
Changes to the Jaspersoft community edition download ×

richardc

Members
  • Posts

    26
  • Joined

  • Last visited

richardc's Achievements

Contributor

Contributor (5/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Hi We applied this fix to our local version of Jasper Server Community Edition: (It corrects the naming issue and also allows direct opening or saving of the pdf rather than opening in a browser window. In ReportPdfExporter.java, setAdditionalResponseHeaders() remove: response.setHeader("Content-Disposition", "inline; filename=\"" + getFilename(context, "pdf") + "\""); replace with: // allow the download dialog box to open: response.setHeader("Content-Disposition", "attachment; filename=\"" + getFilename(context, "pdf") + "\""); // fix for opening PDF in IE6: response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0"); In view-report.js, exportReport() comment out or remove these lines so that a blank html window doesn't open: setBlankFormTarget(); setTimeout('setSelfFormTarget()', 500);
  2. I noticed that grouping is missing in netbeans: 1. in classic, you can select items that you want to group, right click and then select 'Group selected element(s)' 2. if you add elementGroup tags in the code and then go to Report Inspector, the label 'Element group' is missing next to document structure item
  3. Hi Sherman, I have 2 reports on JasperServer (Community edition) which both use the same query - one is a summary report and it has drill down 'report execution' hyperlinks to the other report which is a detail report. The detail report also has links back to the summary report. Rather than execute the query everytime a link is clicked (which effectively loads/re-loads the linked report), is there any way that I can pass the cached query results from one report to the other? Perhaps via a report scriptlet? Regards, Richard
  4. Thanks Lucian! The custom classloader works fine. Cheers, Richard
  5. Here is the source: - class path is not included until after the method verifyDesign is callled Class: net.sf.jasperreports.engine.design.JRAbstractCompiler method: compileReport: public final JasperReport compileReport(JasperDesign jasperDesign) throws JRException { // check if the language is supported by the compiler checkLanguage(jasperDesign.getLanguage()); // collect all report expressions JRExpressionCollector expressionCollector = JRExpressionCollector.collector(jasperDesign); // verify the report design verifyDesign(jasperDesign, expressionCollector); String nameSuffix = createNameSuffix(); // check if saving source files is required boolean isKeepJavaFile = JRProperties.getBooleanProperty(JRProperties.COMPILER_KEEP_JAVA_FILE); File tempDirFile = null; if (isKeepJavaFile || needsSourceFiles) { String tempDirStr = JRProperties.getProperty(JRProperties.COMPILER_TEMP_DIR); tempDirFile = new File(tempDirStr); if (!tempDirFile.exists() || !tempDirFile.isDirectory()) { throw new JRException("Temporary directory not found : " + tempDirStr); } } List datasets = jasperDesign.getDatasetsList(); List crosstabs = jasperDesign.getCrosstabs(); JRCompilationUnit[] units = new JRCompilationUnit[datasets.size() + crosstabs.size() + 1]; // generating source code for the main report dataset units[0] = createCompileUnit(jasperDesign, jasperDesign.getMainDesignDataset(), expressionCollector, tempDirFile, nameSuffix); int sourcesCount = 1; for (Iterator it = datasets.iterator(); it.hasNext(); ++sourcesCount) { JRDesignDataset dataset = (JRDesignDataset) it.next(); // generating source code for a sub dataset units[sourcesCount] = createCompileUnit(jasperDesign, dataset, expressionCollector, tempDirFile, nameSuffix); } for (Iterator it = crosstabs.iterator(); it.hasNext(); ++sourcesCount) { JRDesignCrosstab crosstab = (JRDesignCrosstab) it.next(); // generating source code for a sub dataset units[sourcesCount] = createCompileUnit(jasperDesign, crosstab, expressionCollector, tempDirFile, nameSuffix); } String classpath = JRProperties.getProperty(JRProperties.COMPILER_CLASSPATH); try { // compiling generated sources String compileErrors = compileUnits(units, classpath, tempDirFile); if (compileErrors != null) { throw new JRException("Errors were encountered when compiling report expressions class file:n" + compileErrors); } // creating the report compile data JRReportCompileData reportCompileData = new JRReportCompileData(); reportCompileData.setMainDatasetCompileData(units[0].getCompileData()); for (ListIterator it = datasets.listIterator(); it.hasNext();) { JRDesignDataset dataset = (JRDesignDataset) it.next(); reportCompileData.setDatasetCompileData(dataset, units[it.nextIndex()].getCompileData()); } for (ListIterator it = crosstabs.listIterator(); it.hasNext();) { JRDesignCrosstab crosstab = (JRDesignCrosstab) it.next(); Integer crosstabId = expressionCollector.getCrosstabId(crosstab); reportCompileData.setCrosstabCompileData(crosstabId.intValue(), units[datasets.size() + it.nextIndex()].getCompileData()); } // creating the report JasperReport jasperReport = new JasperReport( jasperDesign, getCompilerClass(), reportCompileData, expressionCollector, nameSuffix ); return jasperReport; } catch (JRException e) { throw e; } catch (Exception e) { throw new JRException("Error compiling report design.", e); } finally { if (needsSourceFiles && !isKeepJavaFile) { deleteSourceFiles(units); } } }
  6. Hi, I am trying to compile a report using JasperCompileManager.compileReport(...). As I use my own classes I have to set the classpath using: JRProperties.setProperty(JRProperties.COMPILER_CLASSPATH, "..."). This seems to work ok as long as I have the classes in the WEB-INF/lib directory. However, if I have a class outside of WEB-INF/lib and add it to the classpath using JRProperties.setProperty(JRProperties.COMPILER_CLASSPATH, "..."), I get the following exception: net.sf.jasperreports.engine.design.JRValidationException: Report design not valid : 1. java.lang.ClassNotFoundException: com.verticali.vap.reporting.scriptlets.ReportScriptletUtils at net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:260) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:144) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:220) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:206) This looks like the same bug as reported in: http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=18750 In that bug, Andrey Shuvikov wrote: "Looking in the code I noticed that JRAbstractCompiler calls verifyDesign() _before_ dealing with classpath. But JRVerifier tries to load classes to verify their type, and classpath is not yet set at this point. Is it a bug or did I misunderstood the code?" There is mention of a patch in that bug and I also found a related patch: http://jasperforge.org/tracker/index.php?func=detail&aid=246&group_id=102&atid=369&action=edit I tried using the latest version of jasper reports: jasperreports-3.0.0-javaflow.jar, but this did not fix the problem. Is there a patch available to fix this? Regards, Richard
  7. Hi Teodor, Can you please let me know where the formulas are being stored for iReport 2.0.2? Cheers, Richard
  8. Hi, I noticed that the file expressions.xml, which used to contain the formulas used in iReport is no longer in the user home > .ireport directory for iReport 2.0.2. I would like to modify the file with methods that I have in the Report Scriptlet class so that they can become available to use in iReport. Can you please let me know where the formulas are now being stored?
  9. Hi, I noticed that the file expressions.xml, which used to contain the formulas used in iReport is no longer in the user home > .ireport directory for iReport 2.0.2. I would like to modify the file with methods that I have in the Report Scriptlet class so that they can become available to use in iReport. Can you please let me know where the formulas are now being stored? Sorry this was meant to go into the iReport forum - I'll post it there Post edited by: richardc, at: 2007/11/27 14:54
  10. Hi Teodor, This issue is quite important - can we raise it as a bug? Another link to the same problem is: http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=8&id=19559#19559
  11. Hi Teodor, This issue is quite important - can we raise it as a bug? Another link to the same problem is: http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=8&id=19559#19559
  12. Hi, This is a duplicate of a previous entry: see http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=8&id=28509#28509) Basically, the rows in Excel don't stretch enough to display all of the text in cells when exporting reports to Excel. It works ok when there is no text overflow, but when there is text overflow, only a proportion of the text is visible in excel. Is there a way to add Excel macro detail in a report template to get the spreadsheet to auto-fit the text? Currently users need to manually auto fit text in Excel by: selecting the rows in excel and then from the menu: Format->Row->AutoFit. However, using this can cause the page height to extend beyond the printable height for the page. Regards, Richard Post edited by: richardc, at: 2007/10/03 15:28 Post edited by: richardc, at: 2007/11/26 08:13
  13. Hi, Is there anyway to do the following: (1) Styles Is it possible to have a single styles file which would be included included in the main report and all associated subreports? This would be very useful as I have a complex report with several subreports and have had to copy and paste the styles into every template. (2) Includes Is it possible to include sections of code into the templates? I have several subreports which have similar code and only differ by filter expression, heading text and color, so again this would be very useful here. Please let me know if any of the above are possible or are in the pipeline.
  14. Hi, I would like to have some text rotated at 90 degrees. This works fine when I output to PDF but doesn't work at all when outputting to WORD. Is this likely to be fixed soon?
×
×
  • Create New...