Jump to content

Giulio Toffoli

Jaspersoft Staff
  • Posts

    620
  • Joined

  • Last visited

  • Days Won

    4

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by Giulio Toffoli

  1. Forget about the print when expressin, it is used to condition the visibility of the textfield. You just need to modify the expression of the textfield (which is what is displayed in the textfield itself). What you did in terms of expression was correct: $F{my_field}.toUpperCase() This will print the value of my_field in upper case. Giulio
  2. Here are the steps: 1. Register the fields (each record is a java bean of the collection). To do it, go to the query dialog, there is a tab called JavaBean, here you can specify which is the javabean that acts as record, and you can map the fields of the bean in report fields. The javabean class must be in the iReport classpath which can be managed from the options dialog. 2. In order to test the report, you need to provide a class with a static method able to produce the collection of beans you need to test. Once you have this class, put it in the iReport classpath (I suggest you to put it in the classpath). Then configure a bean collection data source. Giulio
  3. Yes, it is possible. Actually you will not really merge the cells, you will but the columns you need in a column group, then hide the footer cell of the individual columns, and show only the column cell footer, which will span on the three columns. Giulio
  4. Hi, I'm sorry, but there is no way to display complex html like a table. Giulio
  5. The only way to do something special in the last page is by using the last page footer band, until you are not using a custom datasource able to tell you if there are more records or no. Giulio
  6. hi mbritton, the code provided by your friend is ok, but you cannot use it in an expression (as you can see it is a set of instructions, not just an expression). So the "hard" and clean solution would be to put that code in a Java class, and use an expression like: MyJavaClass.getPreviousDay( $P{my_date} ) Of couse this involves some java coding, compiling and deploy.... The second option is good enough, and it's much easire for this specific case (get the previous day). It just remove 60*60*24 seconds to your original date: new java.util.Date( $P{my_date}.getTime() - 60*60*24 ) if the parameter my_date is not a date, but just a string, you can parse it in this way: new java.text.SimpleDateFormat("yyyy-MM-dd").parse( $P{my_date} ) Regards Giulio
  7. Hard to say. Try to post your question on the JasperReports forum which is much more appropriate for this kind of questions. Thanks a lot Giulio
  8. In spite of how you are trying to use JasperREports with PHP, your current problem is just a java.lang.ClassNotFoundException Here you need to understand how the classpath works when working with PHP. Putting all the jars you need inside C:\Program Files\Java\jdk1.6.0_13\jre\lib\ext’ may be not the best solution. Instead the java bridge of PHP (which is what I assume you are using with the integration) has a configuration parameter in the php.ini file that looks like: [java] java.home="C:\Program Files\Java\jdk1.5.0_10; C:\Program Files\Java\jdk1.5.0_10\lib" java.class.path="C:\wamp\php\ext\JavaBridge.jar; C:\Program Files\Java\jdk1.5.0_10\lib" java.library.path="C:\wamp\php\ext; C:\Program Files\Java\jdk1.5.0_10\lib" java.library="C:\Program Files\Java\jdk1.5.0_10\jre\bin\server\jvm.dll" The line you must check is: java.class.path=... Put all your jars here. Giulio
  9. Hard to say, anything in the log (View->IDE Log) ? Are you sure the query produces data? Giulio
  10. JasperReports creates the files, but not the permissions. I thinkthe webservice allows you to set the default permission mask to assign to new files. Now, can you read this post? It's very important: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=74332 Thanks a lot Giulio
  11. 1. Use JRDesignPropertyExpression 2. The expression text is a java expression. What you would like to achieve with: ("\"![CDATA[" + someVariable + "]]\""); The correct expression is: expr.setText("$V{someVariable}"); or (if someVariable is your stuff) you must create a valid java expression. Now, can you read this post? It's very important: Thanks a lot Giulio
  12. It depends by your iReport version. The easiest way in iReport 3.7.0 is to add other detail bands and a page break at the end of the first ones, so each detail can take a whole page. If you use an older version, you should use a subreport for each page, and pass what you need to print to the subreport using parameters. The subreport may have a datasource expression like: new net.sf.jasperreports.engine.data.JREmptyDataSource() Between each subreports, put a page break element. Now, can you read this post? It's very important: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=74332 Thanks a lot Giulio
  13. Use this expression: ($V{your_value} == 0) ? null : $V{your_value} and then set the Blank when null checkbox. Now, can you read this post? It's very important: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=74332 Thanks a lot Giulio
  14. In the JasperReports roadmap we have the idea to create parametrized styles. So you can set what you call FIELD_VALUE as a parameter for the condition. This would simplify conditions like: show in RED negative numbers... There is not yet a date for this feature, but I consider it really important. Giulio
  15. If you use a blank page as template, you will get a blank page. Use a template which has some stuff in. Giulio Post Edited by giulio at 05/12/2010 09:33
  16. Hi harshanianu, Please use the platform 6.5.1 for the latest versions of iReport Giulio
  17. This is a bug in JasperReports, thanks for reporting it. Do you still have the original jrxml? Just in casem can you attach it to this bug request? I may suggest you a temporary workaround.
  18. This is an old request for JasperReports. Currently it is not supported. Patch and contributions are welcome ;-) Giulio
  19. How do you fill the subreport? There are two options to create an XML sub-datasource from an XML datasource (both are suggested in the expression editor) and explained here: http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/data/JRXmlDataSource.html Giulio
  20. The problem is not the BLOB, but the PDF. You cannot insert a PDF inside a report just like you would do with images or fragments of HTML and RTF (only for text). A solution could be a java function that parse your PDF and extracts the text it contains, and format it in HTML. Please note that HTML in this case is used only to format text, table, images or other stuff like that are not supported. A last option (in the case you just need to produce a PDF as final output) is to create a generic element (see JasperReports API) able to inject the PDF at export time. Not easy. Giulio
  21. Instead of using a dummy group, use a group with an expression like: $V{REPORT_COUNT}%50004==0 In this way every 50004 records the group header is printed again. You may use a different number if you want and force the group to start on a new page. Giulio
  22. You should provide to users a list of safe fonts for your server. Giulio
  23. two options: 1: Add a group with an expression like: $V{REPORT_COUNT}%2 == 0 and put the line in the group footer 2: Add a line to the detail with the same expression as Print When Expression The expression $V{REPORT_COUNT}%2 == 0 is true every two records. You may come up with a better expression to fit your needs (i.e. you may use a custom variable to match the conditions for which the line should be visible or not). Giulio
  24. 1.0.2 ??? It is a very very old version... How do you print the total? What's the reset type of the variable you are using? can you provide more info? Giulio
  25. Hi dhamayanthikd in general this is not possible. But by a theoretical point of view, you may write a generic element to handle OLE objects for specific export formats that support the inclusion of ole objects. It may be a very hard thing to write, since for many format we pass trought other libraries like POI for Excel, etc... This anyway may work when exporting to pure HTML if you have an ActiveX to show ole contents. Giulio
×
×
  • Create New...