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

dayv2005

Members
  • Posts

    2
  • Joined

  • Last visited

dayv2005's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I am having a problem. I have a field that would look something like this "test 1;Test 2;;;" where it holds 5 values. I understand it's bad design but this is some legacy stuff I'm trying to interface with. It will always be 5 values. I created 5 varibles of string type. var1,var2, and so on. var1 expression looks like this... ( $F{MaintOptionDesc}.split(";")[0] == null ? "BLANK" : "NOT BLANK" ) as long as the string is like this "test1;;;;" it works and doesn't error out. But if the string is ";;;;" it errors out. How can i modify this epression to handle no values. Code:Error filling print... Error evaluating expression :     Source text : ( $F{MaintOptionDesc}.split(";")[0].toString() == null ? "BLANK" : "NOT BLANK" ) For input string: "" net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :     Source text : ( $F{MaintOptionDesc}.split(";")[0].toString() == null ? "BLANK" : "NOT BLANK" )     at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:259)     at net.sf.jasperreports.engine.fill.JRCalculator.evaluateEstimated(JRCalculator.java:580)     at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:179)     at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:789)     at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1478)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:125)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:942)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:841)     at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)     at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:877)     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: java.lang.ArrayIndexOutOfBoundsException: 0     at org.codehaus.groovy.runtime.DefaultGroovyMethods.getAt(DefaultGroovyMethods.java:2960)     at sun.reflect.GeneratedMethodAccessor153.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     at java.lang.reflect.Method.invoke(Method.java:597)     at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:51)     at org.codehaus.groovy.runtime.metaclass.NewInstanceMetaMethod.invoke(NewInstanceMetaMethod.java:54)     at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226)     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:754)     at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:765)     at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:753)     at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167)     at leaseVsOwnF_1324659072367_973109.evaluateEstimated(calculator_leaseVsOwnF_1324659072367_973109:773)     at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:246)     ... 13 moreÂ
  2. I don't like how the output to csv handles titles and other bands in iReport. I was wondering if their is a way i can determind if the report is being dumped to a csv file or not and if it is being dumped as a csv file i want to remove certain bands. Is this possible? If it is a csv file, I don't want to print the title, page header, and footer. If it is not a csv file then i want to print them. is this possible with iReports?
×
×
  • Create New...