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

Friendly User

Members
  • Posts

    435
  • Joined

  • Last visited

  • Days Won

    2

 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 Friendly User

  1. [toc on_off::hide=1] You have a created a report with a chart and deployed it to JasperReports Server. You want to have an input control to pop up before running a report on a server to let you specify what informtion out of three possible series - for example Product, Customer and Class - to display. Here is how you can do it. 1. Create a parameter which will regulate the type of chart to choose and to use it afterwards as an input control. To do that in iReport Designer rightclick on Parameters in Report Inspector and click Add Parameter. Give it a name you want (for example type) 2. Create a variable. To do that in iReport rightclick on Variables in Report Inspector and click Add Variable. Give it some name you like. Then you click "..." button near Variable expression. In the opened window you need to write down expression like I gave you. If you have some Java background it should be fairly easy for you. The general idea is to use operator ? to create IF-ELSE construct. Should be something like this: $P{type}==1 ? $F{field1} : $P{type}==2 ? $F{field2} : $F{field3} This will mean that if parameter $P{type} will equal 1 then your variable will become first field you want, if type is 2 then it'll become second field you want, etc. You need to upload the report to JasperReports Server afterwards using either JS web interface or using JasperReports Server Repository Navigator of iReport Designer. In general you create a new Report Unit and point it to use your newly created JRXML. After you created a report with a chart you need to upload it to JasperReports Server. To do so in iReport Designer: Open your Repository Navigator (Window->Repository Navigator). Then add your JasperReports Server instance to it and connect to the server. Once connected go to folder you want. Right click on folder and click Add JasperReports Server Report, give it a name, source JRXML choose to be copied from currently opened report, select the datasource you need. Right click on the created report and click Add->Input control. Input control must have exactly the same name and id as parameter name you chose previously. In input control details set input control's type to Single Select List of Values. List of Values resource should be locally defined. Click on Edit List of Values. Give the list of values some name you want. In second tab add the number of values you want. First column defines how it will look like when you use input control in JasperReports Server. Second column defines what value it will correspond.So you will have something like: Group - 1 Customer - 2 Class - 3 Save everything you did. Now when you run this report in JasperReports Server you will be prompted to select one of those values.
  2. [toc on_off::hide=1] IssueIn some cases when you create a report with UTF-8 characters in the name (like umlauts, accented characters, etc.), save them and try to run them - you get an error. How to avoid this problem? Symptoms of the Problem You created a report with UTF characters and saved it. You run report and get an error:The server has encountered an error. Please excuse the inconvenience. In the server console stacktrace you see a Null Pointer exception. ResolutionHere is how you can deal with the error when using Apache Tomcat webserver: go to your server installation folder go to apache tomcat folder go to conf folder edit the file server.xml find the part: <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> add URIEncoding="UTF-8" to it so it will look like this: <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" /> -restart tomcat.
  3. Hello, -------------------- Can you please shed some light on the props files.?.. where exactly should we create and keep Properties file in application? -------------------- That's the JasperReports.properties file which is the configuration file for JR. It can contain different options and export hints and stuff like that. The file can be read from the file system, accessed as a resource from the classpath, or loaded from an URL. The default name of the properties file is jasperreports.properties. If you want to specify the different source then you need to alter net.sf.jasperreports.properties system property and specify a different file name or location. The default or custom name is successively interpreted as a file name, a resource name, and an URL; the properties are read from the first succeeding source. If you need to access that property at runtime at runtime you need to use the class called net.sf.jasperreports.engine.util.JRProperties and it's static methods. -------------------- Also how will our application will come to know about this properties file as we are just creating the file and not making any entry in code or web.xml???? -------------------- JasperReports library will look for this file. Regarding your license - was it hooked up by iReport? Was the report design compilable in iReport in the first place? Best regards, Vadim Chepuryaev
  4. 1: zip archive is zip distribution of iReport 3.6.0 tar.gz is the same but for Linux. 2: You don't need actually to build JasperReports library, it is already built and is located here: iReport-Professional-3.6.0/ireport/modules/ext/jasperreports-3.6.0.jar It is used by iReport to generate reports. I think the release notes also cover the JR Pro library. What you should just do is install the iReport and use it :) Fusion Charts will be already there available for you to use. That is if you need to use iReport. Regarding the libraries - I think I have covered that part in your previous thread.
  5. here is what needs to be done: -jasperreports.license is put to location where you have the classes, in the root package. -JR Pro JAR files where you have your JAR files in your app -SWFs are to put in the Web app folders, to be accessible just like images or other web resources are. And you need to specify the URL for the SWF files using 3 config props: com.jaspersoft.jasperreports.fusion.maps.base.swf.url com.jaspersoft.jasperreports.fusion.charts.base.swf.url com.jaspersoft.jasperreports.fusion.widgets.base.swf.url The value must be a URL that indicates a directory or web location containing the SWF (Flash) files to render the components. For example: Program FilesiReport-Professional-3.6.0ireportproFusionMaps_EnterpriseMaps hope this helps. Vadim Chepuryaev Jaspersoft Post Edited by chvadim1 at 10/08/2009 13:10
  6. Customizing the Ad Hoc Cache Key Hiding or Removing Ad Hoc Chart Types Modifying the Ad Hoc report templates Changing default directory to save reports in Ad-Hoc
  7. To integrate your custom datasource with iReport Designer you will need the following: A custom datasource An IReportConnectionFactory, an IReportConnection and an IReportConnectionEditor (to configure the datasource and use it in iReport Designer)This is the basic what you need to provide to create a custom datasource support in iReport Designer. If you are providing a custom query executer too then it makes sense to provide a custom panel in the report query dialog to deal with the specific language. You can get more information about that part in the chapter "Creating custom languages and Query Executers" in the iReport Ultimate Guide 3.0: the paragraph "Working with a Fields Provider" particulary explains how to write the panel. There is a difference in the package names (it.businesslogic.ireport is now com.jaspersoft.ireport.designer) and the JRField are now always JasperReports Library classes. You can take a look at the module jasperreports-extensions to have some code as reference. This module provides the support for the xpath2 language, providing an ireport connection that can work as datasource or to provide the required parameters to the report to execute the xpath query. There is no custom fields provider implementation because it reuses the one provided by the xpath language. To see some FieldsProvider implementations, take a look at the package com.jaspersoft.ireport.designer.data.fieldsproviders
×
×
  • Create New...