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

lucianc

Members
  • Posts

    5,609
  • Joined

  • Last visited

  • Days Won

    4

 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 lucianc

  1. If you use a fairly recent iReport version, you can try to directly set the type of your field to java.awt.Image, the JasperReports engine would read the binary data from the DB and convert it to an image. Then you would simply use $F{MyField} as the image expression. HTH, Lucian
  2. If you want to pass the value returned from a subreport to the same subreport in the next detail row, the straightforward approach should work. Be careful to set calculation="System" and not to set resetType="None" for the variable in the master report. See the attached sample. By a holder I meant an object which can store a value, something like Code: class Holder { Object value; void setValue(Object value); Object getValue(); } You could have a variable of this type in the master, pass it to the subreport as a parameter and, in the subreport (using a scriptlet or a dummy expression), store a value in the holder. The same holder would be passed to the second subreport which would retrieve the value from it. HTH, Lucian [file name=subrep.zip size=1261]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/subrep.zip[/file]
  3. See these two discussions regarding email subscription to the forums: http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=46&catid=6 http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=314&catid=6 The "New" marker issue should be raised on the JasperForge.org forum. Regards, Lucian
  4. If both the subreports are placed on the same band, straightforwardly passing a value returned from one of the subreport to the second one would not work because the value is not yet returned at the time the parameter value expressions are evaluated. There are (at least) two ways to work around this (I assume that the second subreport is placed under the first one): Introduce a dummy group which breaks at each row and place the second subreport in the group's footer. This ensures that the parameter values for the second subreport are evaluated after the first subreport returned the value. Don't use the standard mechanism for returning values from subreports, use a value holder subreport parameter instead. The first subreport would use a dummy expression to save the value in the holder and the second one would retrieve it from the holder.[/ol] HTH, Lucian
  5. The problem with your use of a virtualizer is that you switch the virtualizer to read-only mode before you fill the report. Setting the virtualizer to read-only mode should be done after all the data managed by the virtualizer (in this case, the filled report) is final and not expected to change any more. HTH, Lucian
  6. The version number of resources in the repository is only used for optimistic locking. Version history is not recorded and old versions are not available. Regards, Lucian
  7. The infinite loop is caused by the fact that the title band of the subreport never finds enough space to render itself. More precisely: the master page height = 612 - top margin = 20 - bottom margin = 20 --> 572 left for the report content. The subreport has the same margins, so this leaves 532 for the subreport title, but the title band is 572 in height. One way to fix this is to remove (set to 0) the subreport top and bottom margins. HTH, Lucian
  8. I see, you are loading a compiled report. A limited set of changes are allowed on a compiled report, and altering expressions is not such a change. You need to load the report design (*.jrxml file), set the printWhenExpression and then recompile the design. HTH, Lucian
  9. I assume (due to the lack of detailed information) that you are using JRXmlLoader to load a JasperDesign object from the *.jrxml file you create using iReport, and then retrieve the element from the band. If this is the case, you can safely down-cast the instance to JRDesignStaticText so that you can change the printWhen expression. HTH, Lucian
  10. Unfortunately this is not easily achievable. The moment at which chart datasets get increment and the moment at which values are returned from the subreport cannot be arranged in a convenient sequence. More precisely, chart datasets are incremented after a new row is retrieved from the data source and the variables are calculated, but before the band gets rendered, and values are returned from subreports while the band gets rendered. Because of this, the value returned from the subreport is not available when the dataset gets incremented. The similar problem of displaying values returned from subreports inside the same band was solved by introducing the "Band" evaluation time for text fields. Maybe something similar can be done for the chart dataset increment type, but this needs more investigation. Creating charts out of values returned from subreport is still possible using the image renderer approach (collect the values in the scriptlet and create an image renderer by directly using the JFreeChart APIs), but this requires some effort to achieve. Regards, Lucian
  11. There is no built-in mechanism to do that. However, you can pass a value holder object as a parameter to the crosstab/dataset and use a dummy expression to copy the value you want to return into the parameter. You can then retrieve the value in the report and use it. Regards, Lucian
  12. Not sure what you mean by "system" variable. You simply need to create a new variable with calculation="Nothing" and $V{RunningBal}+$P{InitialVal} as expression. And in any case you don't need scriptlets to do this. Regarding the "extension" of the logic of initialValueExpression, two notes: Changing this does not strictly involve "extending" the semantics of initialValueExpression, it actually breaks backwards compatibility. People will witness altered behaviour in certain scenarios. It's never trivial to take a decision in such a case. Base/starting value makes sense for calculations such as Sum or Count, but it doesn't for others like Average or StandardDeviation. Such a functionanily would be then slightly inconsistent across calculation types.[/ol] Regards, Lucian
  13. JasperViewer and JRViewer can only handle a single report currently. You can post a feature request for report list support. JRGraphics2DExporter works on a page-by-page basis, it only exports one page of a report at a time. If you want to use it, you need to specify at least the following export parameters: JRExporterParameter.JASPER_PRINT JRExporterParameter.PAGE_INDEX JRGraphics2DExporterParameter.GRAPHICS_2D[/ul] If you need any more specific information, let me know. Regards, Lucian
  14. I'm not an iReport expert, I don't know what's the standard/easiest way to do this so I'll leave this for others to answer. You could also post a new message on the iReport forum, it would be more adequate. Regards, Lucian
  15. See the scriptlet sample from JasperReports (under demo/samples in the distribution or at http://www.jasperforge.org/images/documentation/jasperreports/samples/ScriptletReport.jrxml ). HTH, Lucian
  16. Spelling/case error: NetWorkDays, should be NetWorkdays. HTH, Lucian
  17. If you download the JR distribution, you'll find a "batchexport" sample under demo/samples.
  18. You can pass a list of JasperPrint objects to the PDF exporter using the JRExporterParameter.JASPER_PRINT_LIST export parameter and the exporter will export all the reports into the same PDF file. HTH, Lucian
  19. Yes, use Code:$P!{MyQuery} as query string in the report. HTH, Lucian
  20. Try setting whenNoDataType="AllSectionsNoDetail" for your report. HTH, Lucian
  21. Are you passing a valid (not-null) connection to the fill method? If so, does the report query return any rows? Regards, Lucian
  22. Apparently the JR project's trackers on sf.net have been made private so that people would post new items on jasperforge.org instead. Sorry, I was not aware of that. Here is a link to a forum discussion related to this matter: https://sourceforge.net/forum/forum.php?thread_id=1468223&forum_id=113530 To use the Javaflow continuations instead of threads for subreport, you only need to add this line to your jasperreports.properties (which should be placed on the classpath): Code:net.sf.jasperreports.subreport.runner.factory=net.sf.jasperreports.engine.fill.JRContinuationSubreportRunnerFactory Regards
  23. On which page does the crosstab lie? If it\'s the summary band, please read this http://jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/FAQ12 Otherwise, attach a sample to replicate the issue or post all the relevant information. Regards, Lucian
  24. JasperServer uses Quartz (http://www.opensymphony.com/quartz/ ) as scheduler. The web application is set up to use WEB-INF/js.quartz.properties as a configuration file for Quartz. To control the number of jobs that Quartz will run on parallel, you need to set the org.quartz.threadPool.threadCount property. HTH, Lucian
  25. The dependency on Javaflow was introduced as a solution to a J2EE compliancy issue. More precisely, the fact that the JR engine needs to spawn a new thread in order to render a subreport raised issues in certain J2EE environments. Javaflow continuations can be used now as an alternative to threads for subreport rendering. More details here: http://sourceforge.net/tracker/index.php?func=detail&aid=1457827&group_id=36382&atid=416703 If you don't have any problems regarding subreports and threads, you could use your Javaflow-disabled build in all the environments. Javaflow continuations are not enabled by default, one needs to do that explicitly; therefore unless you've done that, you haven't been actually using the Javaflow code anyway. Regards, Lucian
×
×
  • Create New...