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

waynerod10

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

Security Advisories

Downloads

Everything posted by waynerod10

  1. Hi, There might be better ways to do it, but for me, for comparing the value inside the array, I always use: ((ArrayList) $P{REPORT_PARAMETERS_MAP}.get( "ref_no")).contains($F{query_id}.toString())[/code]I'll also combine it with a null check... $P{ref_no}.isEmpty()?Boolean.TRUE:(((ArrayList) $P{REPORT_PARAMETERS_MAP}.get( "ref_no")).contains($F{query_id}.toString())) [/code] Note: make sure the brackets are correct as above, else it may throw an errorunder $P{REPORT_PARAMETERS_MAP}.get( "YOU_PARAMETER_NAME_GOES_HERE")) , make sure you just state the parameter name. Do not use $P{ref_no} in there or it will fail
  2. Hi, I have also been struggling with this for quite some time. I couldn't find the drag and drop functionality that others spoke of anywhere. Recently, I found out that if you view it through the Jaspersoft reports Repository, you can reorder the Input Controls from there by just dragging and dropping. You just need to remember to "Save" the report after reordering. See attached PDF file. I am currently using Jasperserver Pro 5.6.1. This drag and drop reordering functionality doesn't work if viewing through Jaspersoft Studio and it also doesn't work if you go to the "Controls & Resources" page (when Editing the report). I'm not sure how it works with other versions or editions of Jaspersoft. Hope that helps.
  3. Hi, I'm not sure if using the $P!{variable_name} syntax works with domain reports. Personally, I found "Filter expressions" to be good for these situations. Suppose I have a report listing all events. have an optional parameter called "Type". If the user specifies the type, then it gets filtered, otherwise it will display all results. If using iReport or Jaspersoft Studio, under the "Filter Expression" section, enter ($P{Type}!=null?($F{events.eventType}.contains($P{Type})):Boolean.TRUE)[/code]The generic format is ($P{PARAMETER_NAME}!=null?($F{DATABASE_FIELD_NAME}.contains($P{PARAMERER_NAME})):Boolean.TRUE)[/code] This will check if any value is specified in the parameter. If not, it will display all records unfiltered. If a value is specified, then it filters to only that value. Hope it helps.
  4. Hi, I was struggling with a similar problem recently as well. I found that using java.util.Calendar instead of date is a better solution rather than doing the subtracting (unless you want exactly 31 days prior). Create a variable/parameter for the Calendar object. I will call this "cal". Set the Class as "java.util.Calendar" and the Default value as "java.util.Calendar.getInstance()" --- If you are using iReport, you can follow the below steps: Create another parameter/variable for today's date. I will call it runDate which the Default value is "new Date()" Then use the following for your ( $P{cal}.set($P{runDate}.getYear()+1900, $P{runDate}.getMonth(), $P{runDate}.getDate()) || $P{cal}.add(Calendar.MONTH, -1))? null : $P{cal}.getTime()[/code]Note: The $P dentoes that it is a parameter. Suppose today is 26-02-2016, it will give you 26-01-2016. Hope that helps. If you are not using iReport, happy to try and explain it using simple Java notation instead.
  5. Hi, You can simply use $X{NOTIN, FOO, FOO} . Hope that helps.
×
×
  • Create New...