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

yananderson

Members
  • Posts

    6
  • 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 yananderson

  1. I struggled to find a solution for this and after combining solutions for similar problems I eventually found this solution. Hope this helps someone. The ProblemIf you have filters running against your report and you dont want the user to be forced to select something for that filter the query returns no records. I want to be able to make a filter ignored if empty. [toc]The Solutionproceed each filter in your domain query string with an additional filter to run the following logic: filter in result set OR <IF filter = empty>1<ELSE>0</IF> in (1) Working example
  2. Hi, I found a need to do this and no resources on how to do it so having done the leg work here it is incase anyone wants to: Dynamicly filter a report based on results running from the beginning of the current quarter up to the current date: Create a date between filter then change the parameters to the following defaults: ((new Date().getMonth()) >= 0 && (new Date().getMonth()) <= 2 ? new Date((new Date().getYear()), 0, 1) :</div><div>(new Date().getMonth()) >= 3 && (new Date().getMonth()) <= 5 ? new Date((new Date().getYear()), 3, 1) :</div><div>(new Date().getMonth()) >= 6 && (new Date().getMonth()) <= 8 ? new Date((new Date().getYear()), 6, 1) : new Date((new Date().getYear()), 9, 1))new java.util.GregorianCalendar().getTime()
  3. I know this is to do with the page margin. You can hotfix the issue by adding this properties expression to a report: <property name="net.sf.jasperreports.export.ignore.page.margins" value="true"/> I'm currently trying to work out how to apply this system wide but no luck so far.
  4. Hi, If you'd like jasper reports to export a table or crosstab report and display the broders that you've setup in Ireports or the adhoc report designer then you need to change a setting in the jasperserver files. the file you need to change is : jasperserver451WEB-INFapplicationContext.xml Find the line: <property name="ignoreCellBorder" value="true"/> Change this to: <property name="ignoreCellBorder" value="false"/> Give tomcat a restart and your reports should now export with the borders. If you only want to apply this change to a single report then try adding this report in iReports:
  5. Hi All, Just throwing this out there as I've been searching for the answer to this and found it hard to pin down. Here is the syntax you can use in the default value expression of a date filter: Start of the current month: new Date(System.currentTimeMillis() + 24*3600*1000*(new java.lang.Integer((new java.util.GregorianCalendar().getActualMaximum((java.util.GregorianCalendar.DAY_OF_MONTH))) - (new java.util.GregorianCalendar().get(java.util.GregorianCalendar.DATE)))).longValue()) End of the current month: new Date(System.currentTimeMillis() - (24*3600*1000* (new Date().getDate() - 1))) The parameter type must be java.util.Date to support this.
  6. So I've had the challange to create a top 10 biggest resutls chart using a domain driven dataset. After a fair bit of searching I've managed to scrape together enough knowledge to do this but thought I'd put my findings here in one place so others can re-create this. Step 1 - Create full dataset chart in jasper reports adhoc editor. Step 2 - import chart into ireports frmo jasperserver repository Step 3 - modify chart to show max 10 records. Right click report, choose chart data. under the dataset tab choose the filter expression memo field and add the following code: new Boolean($V{REPORT_COUNT}.intValue()<=10) Step 4 - add a sort field to the report to sort by your charts measure. The sum of your measure will actually be stored as a field so this can be used to sort the chart reliably. Do this by clicking the icon to enter details on the report query and choosting sort options from the bottom of the popup. Then add field and choose the field that is used by your reports measure and set ti as Descending. This should be all that is necessary to create a top 10 results chart. I've attached the JRXML and an example output to assist in anyone who wants to follow this. Post Edited by yananderson at 08/02/2012 11:34
×
×
  • Create New...