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

mulcamd

Members
  • Posts

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

Everything posted by mulcamd

  1. When creating a Pie chart in the Community editon you have the option "Max slices to show". If set to 8 than an extra "Others" pie is created with the rest. QUESTION: how to implement the same functionality with JasperReport Professional HTML5 highcharts?
  2. My local Java program creates a JRPrint file as output. This works fine. Question: how can I detect if a run of a report from the local Java program results in "No data found". How can I detect this from Java?
  3. I have a query which results 100 records. In a scriptlet I perform some advanced computing on 20 properties a create a JRBeanCollectionDataSource for each property. This all works fine. The detail I do not show. For every property I have created a Group with the group expression "null". This works fine. This is also done in the "AllChartsReport" sample of JasperReports. So my structure is DETAIL GROUP FOOTER PROP01 GROUP FOOTER PROP02 GROUP FOOTER PROP03 ... I want to print each group footer on a new page. So I set the Start on a new page property in iReport to true and I set a minimum heigh. Yet the group is not printed on a new page. Question: how can I force a group footer to be printed on a new page. I even added on the page before a page break and set a minimum heigh, yet it won't start on a new page.
  4. Thanks. I also found that page but having no experience with Ant I was hesitant. However I gave it a try and it works like a charm!
  5. I embedded the JasperReports Library within an application and have users select and run a JASPER file. Question: how can I simply compile all the JRXML files into JASPER files?
  6. I have a report, created with iReport, that has 2 parameters: <parameter name="startDate" class="java.util.Date"> <parameterDescription><![CDATA[start date of the report period.]]></parameterDescription> <defaultValueExpression><![CDATA[new Date()]]></defaultValueExpression> </parameter> <parameter name="endDate" class="java.util.Date"> <parameterDescription><![CDATA[End date report period.]]></parameterDescription> <defaultValueExpression><![CDATA[$P{startDate}]]></defaultValueExpression> </parameter> Question how to get the evaluated value of this parameter in Java? I know that with: report = ((JasperReport) JRLoader.loadObject(new File(jasperFileName))); defaultValue = report.getParameters().getDefaultValueExpression().getText(); I get the default value of the parameter, but then I get "new Date()" in stead of 5 Juli 2012 (in whatever format). Also I get $P{startDate} as a string instead of the value of this parameter, in this case also 5 Juli 2012. Please drop a few Java code lines how to solve this?
  7. How can I, from within a scriptlet, retrieve the name of a report. The name of the report is in the JRXML <jasperReport ... name="TestImage" ...> So in my scriptlet I want to access the name attribute and get TestImage. Please could anyone drop a line of scriptlet code ... Code:<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="TestImage" language="groovy" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
  8. Is there a way to determine the reportname? At the top level in iReport there is the property Report name, see also the XML of the JRXML file. Is it possible from a scriptlet to retrieve the value of this name attribute? Code:<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="XXXXXXXXXXXXX" language="groovy" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
  9. I'm running a report in iReport and it runs out of memory. It reads 150K records and they have to be sorted. The solution is to use Virtualizers. My problem is that the examples given in the documentation start from using a Java program. Also the iReport-Ultimate-Guide-4 does not give a glue. It tells that there is a REPORT_VIRTUALIZER parameters: This defines the class for the report filler that implements the JRVirtualizer interface for filling the report. I want to run this report in iReport. Question: what do I have to do to use a Virtualizer in iReport. Should I add some code in a Scriptlet? Could anyone give a small example?
  10. Thanks, yes I figured that out. Thanks for the link. Yet my question is still unanswered: is there a way to determine in a scriptlet if the report is run in the JasperReports Server of locally in iReport? Post Edited by mulcamd at 05/05/2012 14:26
  11. You misunderstood me. I want to have the report name to appear in the title of the report. Ofcourse I could type it, but my question is: is there a way to retrieve the name of the report or the name of the report file? Is the name stored in some parameter, variable where it can be retrieved, for example with a scriptlet.
  12. How can I determine if a report is run from the JasperReports Server? Background. When running a report in iReport I can use JOptionPane.showMessageDialog to show a message to the user. In JasperReports Server this gives an error. So before showing the message I want to check if the report is run from JasperReports Server. See als my question: jasperforge.org/plugins/espforum/view.php
  13. I want to show the report name in the Title. How or where can I find it, with or without scriptlet?
  14. From a scriptlet I want to show a message to the user and upon Ok quit the report. Questions: How can I show a message to the user? BTW In the Server I see under View -> Samples that there are several message boxes like "#standardConfirm". How can I use or address them? What should I call in my scriptlet to stop the report.Google had no answer, hopefully you have! iReport In the iReport-Ultimate-Guide-4 on page 336 is an example of an Swing JOptionPane popup. Is this possible in JasperReports Server? When issueing the command below I get the error: JOptionPane.showMessageDialog(null, "Popup warning message.", "Warning", JOptionPane.WARNING_MESSAGE); Error Messagejava.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. Error Tracejava.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159) at java.awt.Window.<init>(Window.java:432) at java.awt.Frame.<init>(Frame.java:403) at java.awt.Frame.<init>(Frame.java:368) at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1733) at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1810) at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1673) at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:846) at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:650) at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:621) at Code: Post Edited by mulcamd at 04/28/2012 13:11
  15. From within a scriptlet I need to read a file. The file is located in the same directory as the .JASPER file Question: How to access file from scriptlet Could you please drop a few Java code lines Will I be able to access that file from the JasperReports Server when adding it as a resource Will I be able to access that file from iReport when loading it from the directory where the .JASPER file is located. Is it possible to use a generic piece of Java code for both JasperReports Server and iReport?
  16. From within a scriptlet I need to read a file. The file is located in the same directory as the .JASPER file Question: How to access file from scriptlet Could you please drop a few Java code lines Will I be able to access that file from the JasperReports Server when adding it as a resource Will I be able to access that file from iReport when loading it from the directory where the .JASPER file is located. Is it possible to use a generic piece of Java code for both JasperReports Server and iReport?
  17. Impressive! I find it difficult how to apply in my situation. Like a picture a sample explains often more than 1000 words. Could you provide a very basic sample including an .JRXML report which runs in iReport.
  18. In my scriptlet I do a lot of calculation and create a bean for a histogram in a bar chart. For the calcuation of the histogram I use values. There are almost 1700, so way to much to show as a prompt and hard coding them in the scriptlet is very bad and no flexibel. I want to load these values into the scriplet as a property file. This property file should be stored together with my .JRXML or .JASPER file in the same location (folder / directory and in the repository). Questions: How can I load this property file in JasperServer My problem is that I can not figure out in the scriptlet the location of the .JRXML that is running. How should I make this work in JasperReports Server. I'm open to other solutions than I came up with.
  19. In my scriptlet I do a lot of calculation and create a bean for a histogram in a bar chart. For the calcuation of the histogram I use values. There are almost 1700, so way to much to show as a prompt and hard coding them in the scriptlet is very bad and no flexibel. I want to load these values into the scriplet as a property file. This property file should be stored together with my .JRXML or .JASPER file in the same location (folder / directory and in the repository). Questions: How can I load this property file in iReport My problem is that I can not figure out in the scriptlet the location of the .JRXML that is running. How should I make this work in JasperReports Server. I'm open to other solutions than I came up with.
  20. In my scriptlet I do a lot of calculation and create a bean for a histogram in a bar chart. For the calcuation of the histogram I use values. There are almost 1700, so way to much to show as a prompt and hard coding them in the scriptlet is very bad and no flexibel. I want to load these values into the scriplet as a property file. This property file should be stored together with my .JRXML or .JASPER file in the same location (folder / directory and in the repository). Questions: How can I load this property file in iReport My problem is that I can not figure out in the scriptlet the location of the .JRXML that is running. How should I make this work in JasperReports Server.I'm open to other solutions than I came up with. Post Edited by mulcamd at 12/21/2011 09:21
  21. Hi, I think the problem has to do with the compiling. This takes really long. Since 4.1.x release the Classpath in Tools -> Option ... contains all the .JAR files. As a workaround I remove almost all the JAR files from the classpath except my scriptlet and some that where there in the 4.0.2 version. Then 4.5. is as quick as before. See jasperforge.org/projects/ireport/tracker/view.php
  22. In my scriptlet I need to load a file. This file should be in the same folder / directory as the report file (JRXML or JASPER). Question: how can I determine the folder of the report I'm running? I tried the code below: But this give the folder of the iReport, in my case: Current dir : H:\Program Files\Jaspersoft\iReport-4.5.0 Yet I need the folder / directory the report file is in. Code:public void afterReportInit() throws JRScriptletException{System.out.println("call afterReportInit");try {System.out.println ("Current dir : " + dir1.getCanonicalPath());} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}
×
×
  • Create New...