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

thangalin

Members
  • Posts

    322
  • 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 thangalin

  1. What does the task manager show? Hogging CPU? Hogging Memory? If it's memory, it could be because you have too many other programs open and the Java Virtual Machine is swapping (so hard) to disk.
  2. Try a GROUP BY FECHA_ENVIO with a SUM(NUMERO_ENVIO)
  3. The CityCode parameter was declared as java.util.List. The Default Value Expression was what I showed above. I may have had to do some type conversions because the data came in from a comma-delimited list in an HTML form, passed through PHP, then bridged into JasperReports.
  4. new java.util.ArrayList( java.util.Arrays.asList( new String[] { "August", "Barbara" } ) ) That's what I did (except using Integer types) to pass in an array to be used as: $X{ IN, C.ID, CityCode } Post Edited by thangalin at 05/31/2010 15:02
  5. Also, implementing the method as I first suggested worked. It wasn't too late to change the Time period from the chart customizer.
  6. Here's the problem, Lucian: http://i.imgur.com/VIvrA.png That's not an expression. That means once you create the chart's "Time period", it cannot be (easily) changed. If you wanted to reuse the same report, but give the users the ability to change the time series, you have two options: 1. (a) Duplicate the chart for each Time period. 1. (b) Set a PrintWhenExpression values using the parameter that controls the Time period. For example, if the user selects "Hourly" then the Year, Quarter, Month, Week, Day, Minute, and Second charts would not be printed. But that means having 8 copies of the same chart. Problem: When you have to fix a mistake, or need to change the chart, you have to remember to update 8 charts that are all the same. -or- 2. Add some code that assigns the appropriate org.jfree.data.time.X class to the JRTimeSeriesDataset's time period. Problem: The method for setTimePeriod() is unimplemented. The code is being called within a chart customizer: public abstract class SplineCustomizer extends JRAbstractChartCustomizer { public void customize( JFreeChart jFreeChart, JRChart jrChart ) { configureTrendLine(); } } ( See also: http://jasperforge.org/plugins/mantis/view.php?id=4657 ) For me, the best solution would be to have two options. The basic option is just to select the Time period as shown in the screen shot. The Advanced Options would allow you to make it an expression that maps a string version of the Time period to the class. For example "Year" means to use org.jfree.data.time.Year.class. That way report developers are free to make the time period completely configurable, without having to have octuplicated code. This could also open the door for a factory implementation that allows bi-weekly, bi-monthly, or any other type of time period that is not natively supported by the framework.
  7. Thanks. I look forward to seeing the release where this is fixed. :-)
  8. I don't find "ant -p" verbose enough. Consider: $ ant -p Buildfile: build.xml Compiles the JiGo suite. Main targets: clean Remove classes and API documentation. designer JiGo Designer guesser JiGo Guesser highlight Demo: Highlighted Goban presenter JiGo Presenter random Demo: Random Player replayer JiGo Replayer simple Demo: Simple Goban Default target: help $ ant help Buildfile: build.xml help: [echo] all - Build all JiGo programs [echo] guesser - Build JiGo Guesser [echo] presenter - Build JiGo Presenter [echo] replayer - Build JiGo Replayer [echo] highlight - Build Demo: Higlighted Goban [echo] random - Build Demo: Random Player [echo] simple - Build Demo: Simple Goban [echo] doc - Build JiGo API Documentation BUILD SUCCESSFUL Total time: 0 seconds Feel free to close this.
  9. Yes. See the different types of charts you can create with JR (third from the left on the top row): http://i.imgur.com/raF3j.png You might need to write a customizer for the horizontal axis labels.
  10. Post a screen shot. Post your settings. Copy your SQL from the report into a SQL editor connected directly to the database. What values do you get when you run the query directly (be sure to substitute parameters as required)? Make a page for the data and make sure that the data is what you are expecting.
  11. Change the Series colours. http://i.imgur.com/4ThKn.png Post Edited by thangalin at 05/31/2010 07:09
  12. Line 196 of JasperPDFGeneration.java is trying to call a method on a null object.
  13. Are you sure you want .jrprint files and not HTML or CSV? http://www.fileinfo.com/extension/jrprint Post Edited by thangalin at 05/31/2010 07:04
  14. Make sure you have the Headers set correctly. For example, in PHP you would do: header('Cache-Control: private'); header('Content-Description: File Transfer'); header("Content-Disposition: attachment, filename=$filename.pdf"); header('Content-Type: application/pdf'); header('Content-Transfer-Encoding: binary'); header('Content-Length: ' . strlen( $result ) ); In Java, you have to use the HttpServletResponse, I believe, and I don't know if it automatically sets the content-length for you. Also, the Cache-Control makes sure that IE does not cache the results of the PDF each time -- otherwise you can't get a new PDF! Post Edited by thangalin at 05/31/2010 07:00
  15. Helps with I18N, if that's an issue ... Post Edited by thangalin at 05/13/2010 05:06
  16. (new java.text.DateFormatSymbols().getShortMonths()[$F{MONTH} - 1]).toUpperCase() Post Edited by thangalin at 05/13/2010 05:21
  17. Hi, A few questions: What high-quality GIS maps are available for integration with iReport? Are any APIs available that, when given a latitude, longitude, and radius, will centre the map and draw a circle? Are there any examples showing how to do this?I am looking to add such a map to the attached PDF. There is this list: http://opensourcegis.org/ Thank you! Post Edited by thangalin at 05/12/2010 17:15
  18. $user = "username"; $password = "password"; $database = "database"; // Load the MySQL database driver. // java( 'java.lang.Class' )->forName( 'com.mysql.jdbc.Driver' ); // Attempt a database connection. // $conn = java( 'java.sql.DriverManager' )->getConnection( "jdbc:mysql://localhost:3306/$database?user=$user&password=$password" ); // You have to write this yourself ... $params = report_parse_post_parameters(); // Use the fill manager to produce the report. // $fm = java('net.sf.jasperreports.engine.JasperFillManager'); $pm = $fm->fillReport($report, $params, $conn); header('Cache-Control: no-cache private'); header('Content-Description: File Transfer'); header('Content-Disposition: attachment, filename=report.pdf'); header('Content-Type: application/pdf'); header('Content-Transfer-Encoding: binary'); java_set_file_encoding("ISO-8859-1"); $em = java('net.sf.jasperreports.engine.JasperExportManager'); $result = $em->exportReportToPdf($pm); header('Content-Length: ' . strlen( $result ) ); echo $result; Be sure to launch the JavaBridge properly! Here's what I use: java -Djava.ext.dirs=/opt/jdk1.6.0_20/jre/lib/ext:/usr/java/packages/lib/ext:/home/user/bin/ireport/ireport/modules/ext:/home/user/bin/ireport/ide10/modules/ext -jar JavaBridge.jar The ide10 directory has the MySQL database driver. If you are using Oracle, you'll have to change paths, JAR files, and the following line: java( 'java.lang.Class' )->forName( 'com.mysql.jdbc.Driver' ); Post Edited by thangalin at 05/09/2010 16:59
  19. http://stackoverflow.com/questions/2456155/reporting-trend-line
  20. Go Pro: http://www2.jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=65860 See also: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=65307 Lastly, you might be able to implement your own Pie chart subclass and add hyperlinks based using the equivalent of an image map. You might try looking into clickable maps with JasperReports. Post Edited by thangalin at 04/22/2010 16:17
  21. It's possible. See also: http://stackoverflow.com/questions/1268373/how-do-you-fix-a-bug-you-cant-replicate
  22. My guess is that the error is caused by an environmental problem. What is your CLASSPATH? What is your PATH? What version(s) of Java do you have installed? - Try removing OpenJDK and other versions of Java - Install only a single version of Java What is the installation location of iReport? Did you install new versions over old versions?
×
×
  • Create New...