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

mdahlman

Members
  • Posts

    1,332
  • 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 mdahlman

  1. JRS doesn't have the idea of "prompt for some of the input controls". When you first run the report either it does not prompt (and the report runs with default values) or else it prompts and present all of the input controls. Perhaps you want to display the input controls "In Page" instead of with a popup. That way users always notice the possibility of setting these filters. Maybe remove the default values for the Date input controls so the user is forced to set these himself. Regards, Matt
  2. Info about the JVM in use and the application server will probably be more important than the OS. What are you using for those?
  3. Robi, The first issue sounds like a MySQL issue. The Slovenian character could get lost because the client has different settings from the server. Often a url like this can help: jdbc:mysql://localhost:3306/jasperserver37?useUnicode=true&characterEncoding=UTF-8 The second issue is a font issue. You are generating the PDF with a font that doesn't include "Ä". The behavior of iText (which is what JasperReports is relying on) is to skip any characters not supported by the font. Use font extensions and define an appropriate font. Then the PDF will be good. Regards, Matt
  4. What version of Cassandra are you using? What version of the Cassandra connector? From the doc Cassandra-connector-for-Jaspersoft-doc-0.5.pdf: "Version 0.5 of the Jaspersoft Cassandra connector was updated to work with Cassandra version 0.8. Cassandra is moving quickly, and it does not have strong backwards compatibility. Users of older versions of Cassandra should use Jaspersoft's Cassandra-connector-0.3." Also, I don't know much about running Cassandra in local mode. But I've read that it's possible. I see that your host is localhost. So maybe you're in local mode. This post indicates a couple of things to try: http://gettingstartedwithcassandra.blogspot.com/2011/06/exception-connecting-to-localhost9160.html Please let us know how it goes. Regards, Matt
  5. JasperReports Server commercial edition has dashboarding as a feature. JasperReports Server community edition does not have this feature. But it sounds like your goal is to create a report that lists out a bunch of other reports. Then clicking on one of these links takes you to another report. You can certainly do that in JasperReports Server community edition. Regards, Matt
  6. I'm not sure this is possible. Reports don't have an organization like users do. Of course the report is located within an org... but the report isn't really "aware" of its location in the repository. On the other hand... reports don't really move around the repository. Following your example, you have this report: Organizations/Test_Organization/myreport1 You could hard-code "Test_Organization" in the report. But that's pretty obvious; you probably already thought of that. So I guess that you have reasons for not wanting to do that. Can you describe your general requirement a bit more? Regards, Matt
  7. From the JasperReports Server login page you can manually set the Locale and the Timezone. If you change that locale, do you see different currencies in your report? Regards, Matt
  8. glsong, It sounds like you are using a JDBC connection. You need to use a "Hadoop-Hive Data Source". Related: perhaps you used "SQL" as the query language. You need to use "HiveSQL". I guess that your report should work after you double-check these 2 points. AB, I assume that prompts made from static lists are fine for you. But prompts based on HiveSQL queries could be more difficult. They will work, but by default only SQL is available as a query language for input control queries. You would need to add HiveSQL as an additional language there. If you are still having problems with prompts, please post a few details. Regards, Matt
  9. Did you start with the sample here?: <jasperreports-server-install>/samples/php-sample Regards, Matt
  10. You probably checked "Always prompt" [unintentionally].
  11. I don't really know Java all that well... but you need something sort of like this: DateUtils.parseDate($P{stringDate}, {"dd-MM-yyyy"} ) They made it an array so that you have the flexibility to define several patterns to try: DateUtils.parseDate($P{stringDate}, {"dd-MM-yyyy", "dd/MM/yy"} ) Google up how to create a String array if that doesn't work. And please post the answer. In contrast, there should have been no need to Google for the Commons Lang jar. My article links straight to the Commons project. You can download the binaries there: http://commons.apache.org/lang/download_lang.cgi. Good luck, Matt
  12. Excellent questions. I tested things out in order to give complete answers. In doing so we found one thing that wasn't implemented as expected. I have posted an update to the connector. Please update to version 0.7 of the connector which is now downloadable. This answer should apply to both sszretter & dronk. "MongoDB does not support joins" - http://www.mongodb.org/display/DOCS/MongoDB+Data+Modeling+and+Rails You guys already know this... but I'm mentioning it here for clarity for future readers. Given that MongoDB can't do joins... how can we do joins? Use subreports. (Note: it might be better in specific cases to use a Table component or a List component. I'll think about doing an example of that later. But subreports are nicely generic for all sorts of requirements.) Example1: I want to find all of the accounts in some particular countries. Here's one way to do it. My main report returns Canada, Mexico, USA. My subreport runs once for each country and gets the accounts in that country. The subreport query looks like this: ... 'findQueryRegEx':{'billing_address_country':'/$P{AccountCountry}/','name':'/^B /'} ... There's no need for filtering on accounts that begin with the letter B. I just did that to make my report shorter. Example2: I want to find all of the accounts in some particular countries. But the prospect of running N+1 queries makes me uncomfortable. Here's another way to get the same accounts data. My main report returns Canada, Mexico, USA. My main report puts these 3 strings into a Collection object. My subreport runs only once using an $in clause to get just the relevant accounts. The subreport query looks like this: ... 'findQuery':{ 'billing_address_country': {'$in':$P{AccountCountryCollection}} } ... Example1 is probably simpler to understand and more widely applicable. You should start with that. Example2 has the potential to be much faster. Running 2 queries might be a lot quicker than running N+1 queries. As I'm writing this, I'm realizing that a JasperForge post is not the ideal format for this information. I have included the key information, so you should be able to get your reports working. But I'd like to write a longer article to make things clearer. I'll write that article soon and update this article with a link to that post. Example1 should work fine for you with the older MongoDB connector. Example2 requires v 0.7 or later to handle Collections. Please let us know how your reports work out. Regards, Matt
  13. Warren, First, I'm afraid that JRS doesn't have this feature today. It's a good one. It will certainly come someday. Second, it's not such a big customization to achieve this today. Jaspersoft gave a webinar on dashboards that included this example. You can find the recorded webinar easily enough on jaspersoft.com by searching for "dashboard". You can find the materials from the webinar in this thread: http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=85369 It includes the sample code to do precisely what you describe in your post. (It also has an example about integrating with Google Maps which you can ignore.) Take a look at that to see if it gets you going in the right direction. Regards, Matt P.S. Be sure to log this enhancement request formally with Technical Support! It's already a known enhancement request, but that will raise its priority.
  14. Mike, It's a little misleading to think that iReport knows something about the APP driver. It includes it in its hard-coded list of drivers. But that's it. It doesn't include the driver. Here's my summary of the DB2 drivers that I put together for my own use. Perhaps it will help. "The APP driver" - The IBM DB2 App Driver is a type-2 JDBC driver. This means you must install the DB2 client classes (dlls) on your client. This is generally bad for us. driver: COM.ibm.db2.jdbc.app.DB2Driver url: jdbc:db2:<dbname> delivered in: db2java.zip "The Universal driver" - The IBM DB2 Universal Driver is a type-2 JDBC driver. driver: com.ibm.db2.jcc.DB2Driver url: jdbc:db2:<dbname> delivered in: db2jcc.jar "The NET driver" (occasionally known as "The COM driver" - The Net Driver is a type-3 JDBC driver. driver: COM.ibm.db2.jdbc.net.DB2Driver url: jdbc:db2://<server hostname or IP address>:<DB2 JDBC Applet Server port number> / <dbalias> delivered in: db2java.zip "The Universal driver" - The IBM DB2 Universal Driver is a type-4 JDBC driver. driver: com.ibm.db2.jcc.DB2Driver url: jdbc:db2://<server hostname or IP address>:<DB2 UDB Instance port number> / <dbalias> delivered in: db2jcc.jar & db2jcc_license_cu.jar Note that the universal driver is listed twice. The same class can be used as a type-2 or a type-4 driver. You have to look at the url to know which one is being used. All the rules change with DB2 for iSeries (AS/400, System i, whatever it's called now). The above notes apply only to DB2 UDB. Regards, Matt
  15. It looks standard. Just create a group on the IP field. Regards, Matt
  16. Your question is really more of a Java question than an iReport question. It's fine to post questions like that here... but you might get better responses on a Java forum somewhere. This expression is valid... but it's not good: $V{pureInt}.parseInt($V{blanknums}) The reason I say it's not good is because it's very misleading. It is exactly identical to this: java.lang.Integer.parseInt($V{blanknums}) That's because parseInt is a static method on the Integer class. It can be very useful... but it completely ignores the class used to call it. In your example the variable $V{blanknums} gets parsed and purInt gets ignored. That's not at all what you're attempting to do. SimpleDateFormat is great for parsing a Date into a String: new SimpleDateFormat("yyyyMMdd000000").format($P{StartDate}) new SimpleDateFormat("dd-MMM-yyyy").format($P{StartDate}) But you want the opposite of that. I don't think SimpleDateFormat will help you. I think you need to create (or find) a different helper class. Java Common Lang has the function "parseDate" to do exactly what you're looking for: http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/time/DateUtils.html I wrote an article back in 2009 explaining how to use the Commons Lang classes in a report. Date Calculations in JasperReports. It doesn't explicitly show converting Strings to Dates. But you should be able to first follow the attached example there, and then you can add a Field or a Variable that uses org.apache.commons.lang.time.DateUtils.parseDate. Let us know how it goes. Regards, Matt P.S. If your data is coming from a database, then it's probably easier to parse your strings into date objects inside the SQL query.
  17. Natalie, You wrote "I edited [...\]context.xml the way I did in 3.7.1" But it's not clear whether you followed the 4.1 Installation Guide. The most common for problems along these lines is the way that Tomcat makes a copy of context.xml named jasperserver.xml inside .../tomcat/conf/Catalina/localhost. (The precise location depends on the version of Tomcat and the OS, but the idea should be clear enough.) Then you can edit .../jasperserver/META-INF/context.xml all you want... but Tomcat will ignore the changes. If that's what you're running into then you should be able to get around it by deleting jasperserver.xml. Be sure tomcat is stopped while you do it. Regards, Matt
  18. It sounds like JR may not be a good fit for your needs. I think that after "using this product for a short time" it's perhaps premature to claim "JasperReports is just not a very good tool for most companies". It's in production in hundreds of thousands of deployments. If you need a screwdriver, it doesn't necessarily mean hammers are poorly constructed and useless. Regards, Matt
  19. I'll expand my earlier post. Dates are hard to work with in Java. Dates are hard to work with in Groovy too! (I'm not aware of any Groovy features to handle any date functions like this.) My recommendation to use Java Commons Lang still applies. The samples that I include there use Groovy as the report language. They show exactly the type of calculation you are describing. Regards, Matt
  20. The fonts "Serif", "SanSerif", and "Monospace" are Java logical fonts. This means that the JVM will map them to some physical font. This is great: it means that you're sure to have some available font that gets used. This is bad: it means that you don't know exactly what font will be used. It depends on how the OS and the JVM are configured. It displays for you in Arial on your machine. But it may display in a different font on a different machine. The fact that it's a read-only font extension isn't important to how it gets displayed. This is just because it's in a .jar file that you cannot alter that comes with iReport. When generating PDFs you usually care about the precise font that gets used. In this case the logical fonts are not a good choice. Create a font extension and define the font that you want. Regards, Matt
  21. This is probably a Groovy issue. The quickest solution is to change the report language to Java instead of Groovy. It's a property set at the root level of the report. If you want to keep using Groovy it should be possible... But it will depend on the exact version of Groovy in use (this depends on the version of JasperReports that you're using). Groovy made big changes to how it handles nulls, and the changes were not backwards compatible. So it was impossible for JR to continue handling things consistently between versions. It's likely that you need a test like this to get what you want: $F{myint} != null ? $F{myint}.toString() : "N/A" But the results of this are dependent on the version of JR! That won't give the desired result in iReport 4.0.0. It works great in Jaspersoft Studio 1.0. You would have to test with iR 4.0.1, 4.0.2, 4.0.3 to know exactly when the appropriate change in JR was introduced. Regards, Matt
  22. The error is because you wrote "Integer.praseInt" instead of "Integer.parseInt". The list of functions on the right includes a list of useful functions based on the datatype of the Field or Variable you have selected. It doesn't include static functions of other classes like java.lang.Integer. I'm not exactly how it could do that... but it seems like there's a valid enhancement request in there somewhere. Please log it in the tracker and add as much detail as you can about what the feature should include. If you have commonly used functions, you can add them to the "User Defined Expressions" that you see in the left panel. Go to Tools -> Options and you'll see the area you can define these. For example, you might want to add "Integer.parseInt(String)" so that you can just pick it from the list and not risk entering a typo. ;-) Regards, Matt
  23. pieckm, Thanks for posting the details. I wouldn't call the choice in iReport a bug to be corrected. "The APP driver" is a valid DB2 driver provided by IBM. Having it in the list is reasonable. The proposed url is correct for this driver. But "The Universal driver" is much more commonly used. This is the driver you wanted. Adding this would be great. Please log this in the tracker as an enhancement request. Regards, Matt
  24. mdahlman

    pdf fonts

    You may need to un-define "pdfFontName" everywhere in your report. Just use the font(s) that you have defined in the font extension jar file as the Font for your text fields. Regards, Matt
  25. "Created a JDBC Datasource. The JDBC passes Connection test." You should not create a JDBC Data Source. This is probably the problem. You need to create a data source of type "Hadoop-Hive Data Source". Let us know if that fixes it. Regards, Matt
×
×
  • Create New...