Jump to content
Changes to the Jaspersoft community edition download ×

lucianc

Members
  • Posts

    5,609
  • Joined

  • Last visited

  • Days Won

    3

 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. JasperReports relies on the JavaBeans standard to resolve object properties (via Commons Beanutils), so you can use the mechanisms defined in the standard to register property names to be resolved from reports. For instance you can create a BeanInfo class and define the customer_name property: public class CustomerBeanInfo extends SimpleBeanInfo { @Override public PropertyDescriptor[] getPropertyDescriptors() { try { return new PropertyDescriptor[] {new PropertyDescriptor("customer_name", Customer.class, "getCustomerName", null)}; } catch (IntrospectionException e) { throw new RuntimeException(e); } }}[/code]
  2. You can specify the mapping of a report field to a property name in the Java class using the net.sf.jasperreports.javabean.field.property property. For instance <field name="customer_name" class="java.lang.String"> <property name="net.sf.jasperreports.javabean.field.property" value="customerName"/> </field>[/code]Regards, Lucian
  3. marionunes1997 I don't think we'll be able to retrace the target of the link posted above. But there are good chances that it wouldn't actually be relevant to your problem, I recommend posting your question in a new thread. Regards, Lucian
  4. One solution to allow the text element to stretch is to place in a different band than the element that runs the subdataset. For instance if you currently use the detail band, you can create two detail bands, have the subdataset in the first band and the text that displays the returned value in the second band. Regards, Lucian
  5. Crosstabs display aggregated data and one cell can correspond to several records in the data source. For that reason field values cannot be used directly in crosstabs, you need to pass field values as crosstab groups and use the group variables to display the values. You can also use crosstab parameters but only when there is a single value to be passed, that is when the value does not change from one row/column to another. Regards, Lucian
  6. Try to do outputStream.close(); after exporter.exportReport(); Regards, Lucian
  7. The dependency is published in a repository located at https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/ You need to include that repository in your Maven project. Regards, Lucian
  8. lucianc

    Report Splitting

    For a video explanation, please check out our Dr. Jaspersoft Report Splitting session .Report splitting allows you to split the output of a single report executed by the JasperReports Server scheduler into several parts, which can be delivered individually to different destinations. A common scenario for report splitting is to design a report that contains data for several entities (such as accounts, departments or divisions) and then run the report in the JasperReports Server scheduler with a separate output file for each entity. Report splitting is based on report parts, which are traditionally created by Book reports. Running a book report produces a generated report that is split into multiple parts, each consisting of several consecutive pages. The JasperReports Server report viewer displays report parts as tabs that can be clicked to navigate to the first page of the part. Version 8.2.0 introduces properties that can be set at the report part level to control the way the parts behave in different scenarios. The properties used in JasperReports Server are: net.sf.jasperreports.print.part.visible to toggle the part visibility as a tab in the report viewer net.sf.jasperreports.print.part.split to trigger an output split in the report scheduler Arbitrary net.sf.jasperreports.print.part.* properties to use dynamic report job output attributes in the scheduler. Also starting from version 8.2.0, report parts can be generated from band-based (non book) reports as well by setting properties on a report element to trigger the report part creation. The net.sf.jasperreports.print.part.name property set on an element triggers a part creation starting with the page on which the element is placed and also provides a name for the part. Additional part properties mentioned above can be set on the same element that triggers the part creation. Band-based reports meant for report splitting need to meet a certain conditions imposed by the splitting requirement. First of all the reports need to be paginated, with page breaks in the places where splitting is meant to occur. That can be achieved for instance by grouping the data according to the splitting value and setting the isStartNewPage flag for the group. Then, if the report displays a "Page i of n" text, it would normally need to be created in such a way that the current and total page numbers are relative to the report part and not to the entire report. The isResetPageNumber group flag and group evaluation time for the text can be used for that in most cases. For book reports the conditions mentioned above can be met easier given that pagination can be configured per individual book part. Designing reports meant for splitting is made easy by Jaspersoft Studio, which provides a Report Splitting configuration dialog for report elements and parts. Once a report has been designed for report splitting, executing it via the JasperReports Server scheduler will produce separate outputs for each report part that has the net.sf.jasperreports.print.part.split flag set. Note that the conditions listed above still need to hold, which means that splitting will not apply to unpaginated report outputs. Arbitrary net.sf.jasperreports.print.part.* properties set at the part level can be used to provide dynamic values for report job output attributes. To do that, property placeholders of the form ${net.sf.jasperreports.print.part.*} need to be set as report job attributes; that can be done only for attributes having text inputs and not for attributes that use radio or combo boxes. Part properties can be used for attributes that apply to individual job outputs, that is output name and repository location, output destinations and email notifications. Job schedule, report parameters and job status cannot use part properties.
  9. My bad, it seems that there were such versions released but not via the main channels. You can find the jars at https://jaspersoft.jfrog.io/ui/native/jr-ce-releases/net/sf/jasperreports/jasperreports/
  10. You can download the jar from the central Maven repository https://central.sonatype.com/artifact/net.sf.jasperreports/jasperreports/6.20.1/versions And you can find the whole project on SourceForge https://sourceforge.net/projects/jasperreports/files/archive/jasperreports/
  11. Chromium 111 introduced a couple of incompatibilities with the library used to connect via the DevTools Protocol. You can workaround the problem by adding the following properties to WEB-INF/classes/jasperreports.properties: net.sf.jasperreports.chrome.page.isolate=truenet.sf.jasperreports.chrome.argument.remote-allow-origins=*[/code]Regards, Lucian
  12. You report has language="javascript". The Rhino JavaScript engine has been removed by default in 8.1.0, see https://community.jaspersoft.com/documentation/tibco-jasperreports-server-release-notes/v810/changes-functionality You can either add Rhino back into JasperReports Server or change the report to use language="java" as you don't seem to have any expressions that actually use JavaScript syntax. Regards, Lucian
  13. Set the following two properties under Settings/Jaspersoft Studio/Properties: net.sf.jasperreports.chrome.page.isolate=truenet.sf.jasperreports.chrome.argument.remote-allow-origins=*[/code]A background, the problem is caused by Chrome/Chromium 111 introducing changes that makes it incompatible with the library used to connect to the Devtools Protocol. The two properties above are workarounds for the incompatibilities. Regards, Lucian
  14. You can find it at https://sourceforge.net/projects/jasperstudio/files/
  15. What you need to do is to register your scriptlet factory as an extension. To do that you'll first need to implement an extension factory like this: public class MyStandardScriptletExtension implements ExtensionsRegistryFactory { @Override public ExtensionsRegistry createRegistry(String registryId, JRPropertiesMap properties) { return new SingletonExtensionRegistry<>(ScriptletFactory.class, new MyStandardScriptletFactory()); }}[/code]And then create a file called jasperreports_extension.properties in the root of your jar with the following contents: net.sf.jasperreports.extension.registry.factory.my.standard.scriptlet=<my.package>.MyStandardScriptletExtension[/code]
  16. You need to use https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts instead of https://jaspersoft.jfrog.io/ui/native/third-party-ce-artifacts Regards, Lucian
  17. Make sure there are no trailing spaces (after the class name) in jasperreports_extension.properties.
  18. Try using calculation="Nothing", that basically keeps the last value. Regards, Lucian
  19. It looks like you have a parametersMapExpression in your report (under the dataset of a table) that evaluates to a String object instead of a java.util.Map. You can check it in Jaspersoft Studio by selecting the table and then looking in the Properties view, Dataset tab, at Parameters Map. That expression needs to evaluate to a java.util.Map instance. Regards, Lucian
  20. Made a quick test and it worked fine for me. Please include information on how to reproduce the problem (Jaspersoft Studio version, JRXML file and so on).
  21. The fonts used in the JasperReports Unicode sample work fine, see attached PDF. Try using those fonts, if it doesn't work attach a detailed test case to reproduce your problem. Regards, Lucian
  22. @cooperTWICE, see https://github.com/TIBCOSoftware/jasperreports/issues/286
  23. You can find the iText version patched for glyph rendering here https://jaspersoft.jfrog.io/ui/native/third-party-ce-artifacts/com/lowagie/itext/2.1.7.js6/ (for JasperReports 6.9.0). But for cyrillic you shouldn't normally need glyph rendering, using a font extension should be enough. See for instance the Unicode sample report. Regards, Lucian
×
×
  • Create New...