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

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. What you need to do is add the following line to WEB-INF/classes/jasperreports.properties: net.sf.jasperreports.image.dpi=300[/code]A server restart is required. Regards Lucian
  2. The style template expressions works fine when you run the report, but it does seem that Jaspersoft Studio has a problem with it in design mode. I suggest you to log a bug for Studio in the project Trackers.
  3. Variables do not work because style templates are loaded before variables are initialized. Functions and parameters should work fine. If you have an example with a function not working in a style template expression, post a full JRXML to reproduce the problem (and detail what "results in failure" means). Regards, Lucian
  4. The code requires JasperReports 5.5.2 or newer. I don't know what exactly com.springsource.net.sf.jasperreports-2.0.5.jar is. I suggest you to use JasperReports jars that you either download from this site (at http://community.jaspersoft.com/download) or via Maven at http://repo1.maven.org/maven2/net/sf/jasperreports/jasperreports/
  5. One option is to use the JasperReports print exporter with a Java PostScript stream printer. The biggest problem with such a solution is that texts would be rendered as shapes when the report uses a font that's not mapped in psfontj2d.properties. The code would be something like this: JRPrintServiceExporter exporter = new JRPrintServiceExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); SimplePrintServiceExporterConfiguration configuration = new SimplePrintServiceExporterConfiguration(); configuration.setDisplayPageDialog(false); StreamPrintServiceFactory[] factories = StreamPrintServiceFactory.lookupStreamPrintServiceFactories( DocFlavor.SERVICE_FORMATTED.PRINTABLE, DocFlavor.BYTE_ARRAY.POSTSCRIPT.getMimeType()); try (FileOutputStream out = new FileOutputStream(filename + ".ps")) { StreamPrintService printService = factories[0].getPrintService(out); configuration.setPrintService(printService); exporter.setConfiguration(configuration); exporter.exportReport(); }[/code]Regards, Lucian
  6. See http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.style.{style_property_suffix} What you need is <reportElement ...><propertyExpression name="net.sf.jasperreports.style.backcolor">$P{customColor}</propertyExpression></reportElement>[/code]Regards, Lucian
  7. What you need to do is to escape $P{..} with $$P{..} in the Q_WITH_NUMFACT expression so that they are interpreted literally: ($P{WITH_NUMFACT} == 1) ? " AND FACTUR_MAITRE.NUMFACT = $$P{NUMFACT} " : " AND FACTUR_MAITRE.FLAG_TRI >= nvl( $$P{TRI} ,1) $P!{Q_IN_NOTIN}"[/code]Regards, Lucian
  8. @michael.froehler, your report ends up in an infinite loop because the text elements have isPrintWhenDetailOverflows="true". Do you actually need that flag to be set? Resetting would probably result in the report completing normally. Regards, Lucian
  9. In most cases jasperreports-javaflow is not needed, the regular jasperreports jar will do fine. If the error no longer occurs after switching to ThreadPoolSubreportRunnerFactory, you should get rid of the javaflow dependency for good unless you have a specific reason to use it.
  10. If you have unpaginated reports, also take a look at the net.sf.jasperreports.virtual.page.element.size property. Set a value lower thatn the default (2000) and see if it makes any difference.
  11. Do you have the stack lines that shows where the hashCode loop begins (from net.sf.jasperreports code)? That might help in understanding what causes the circular calls. Regards, Lucian
  12. Starting with JasperReports 6.0.0, you can create a text field having evaluationTime="Master" and use something like "Page " + $V{MASTER_CURRENT_PAGE} + " of " + $V{MASTER_TOTAL_PAGES} as text expression. Regards, Lucian
  13. The block size argument is in bytes, so 4096 actually means 4 KB and not 4 MB. 4 KB block size should be fine in most cases, the OOM error might have another explanation. You could try to pass a bigger block size, but it wouldn't necessarily help. Regards, Lucian
  14. If you want to display the returned value in the same band as the subreport, you'll have to set evaluationTime="Band" for the text element that displays the return value. Regards, Lucian
  15. The reason for which it doesn't work in JRS is that there's a global property that excludes page headers from Excel exports, but with a flag to keep the first header. If you look in WEB-INF/classes/jasperreports.properties you'll see the following line: net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1=pageHeader This property gets to override the property from the report (which is not exactly normal). Try commenting/deleting the property in jasperreports.properties and retesting your report (after a server restart). Regards, Lucian
  16. Your code worked fine with my jasperserver license (after changing the license path in WeeklyReports). JR Pro licenses are different from JRS licenses, but JR Pro is supposed to work with JRS licenses as well. It might be a good idea to contact the Jaspersoft support service, they could issue a separate JR Pro license or sort out if there's a problem with the JRS license. Regards, Lucian
  17. Try putting bcprov-jdk14-1.50.jar (you can get it from http://search.maven.org/remotecontent?filepath=org/bouncycastle/bcprov-jdk14/1.50/bcprov-jdk14-1.50.jar for instance) on the classpath instead of com.jaspersoft.studio.bundles.bouncycastle_1.4.6.jar. Regards, Lucian
  18. Looking at your code, it might be that you use the same parameters map object for all the reports. That would be a problem, you need to create a fresh map for each fill process. Regards, Lucian
  19. The Chart Data/Configuration/Value/Label Expression is somewhat misleading, it's actually a label for the measure/series itself (like "Sales Amount" or "Number of items"). If you want to specify a label for each point/item in the series, you'll have to do the following: In the category level, add a Bucket Property called NumberString, using $F{NUMBER_STRING} as expression.In Value/Advanced properties, add a property with SeriesItemProperty as Contributor, label as Property Name and Level1.NumberString as Bucket Value.In Chart properties, add a property called plotOptions.pie.dataLabels.format using {point.label} as value.Attaching a JRXML with the solution described above. Regards, Lucian
  20. With JasperReports/Server 6.3 you don't need the old PLSQL query executer jar and net.sf.jasperreports.query.executer.factory.plsql/PLSQL lines in jasperreports.properties, the PLSQL query executer has been included in the core JR library. Remove the jar (not sure what the name was) or at least the jasperreports.properties entries that point to com.jaspersoft.jrx.query.PlSqlQueryExecuterFactory. Regards, Lucian
  21. Please post the full exception stacktrace (with Caused by.. lines).
  22. You can use something like /PAGE/DATA/*/ITEM as XPath query, and then map a field to ORDER/ORD and use it as sort field: <?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="xml_data" pageWidth="995" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"><queryString language="XPath">/PAGE/DATA/*/ITEM</queryString><field name="ITEM_NAME"> <fieldDescription>ITEM_NAME</fieldDescription></field><field name="ORD" class="java.lang.Integer"> <fieldDescription>ORDER/ORD</fieldDescription></field><sortField name="ORD"/><detail> <band height="20"> <textField> <reportElement width="200" y="0" x="0" height="20"/> <textFieldExpression>$F{ITEM_NAME} + " " + $F{ORD}</textFieldExpression> </textField> </band></detail></jasperReport>[/code]Regards, Lucian
  23. Starting with JasperReports 6.0 frames have an attribute called borderSplitType that determines whether top and bottom borders are to be drawn when a frame across pages. There's also a property called net.sf.jasperreports.frame.border.split.type that provides the default setting, see http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.frame.border.split.type You'll need to upgrade to a recent JasperReports version (and implicitly to Jaspersoft Studio) to benefit from this feature. Regards, Lucian
  24. You are using $P{REPORT_PARAMETERS_MAP}.get( "students" ) as data source for the list, which means that a single data source object is used several times. That will not work because the data source gets consumed the first time it is used. You'll need to create a fresh data source instance each time (for instance by putting a list in the parameters map and using new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((List) $P{REPORT_PARAMETERS_MAP}.get("studentsList")) as list data source, or if the data source implements JRRewindableDataSource find a way to call moveFirst() before reusing the data source. Regards, Lucian
×
×
  • Create New...