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

lrewell

Members
  • Posts

    2
  • Joined

  • Last visited

lrewell'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. Hello Gaby Thanks for you reply. I saw the use of the $X parameter on the forums and tried to get it to work previously with out much luck. So when I saw your solution I was glad as I seem to be on the right track. When I tried what you suggested I cannot get it to work. My query now looks like this WHERE contractdate::date BETWEEN $P{startDate}::date AND $P{endDate}::date AND $X{IN,value,A} Paramter defined as A java/lang.string When I create the values in code I have "(value1,value2)" When I run the report I get this error. at java.lang.Thread.run(Thread.java:595) net.sf.jasperreports.engine.JRRuntimeException: Invalid type + java.lang.String for parameter A used in an IN clause; the value must be an array or a col lection. It seems like it is expecting a collection even though I specified the parameter A as a string. Is this something to do with the IN clause and how java handles it? Any help would be much appreciated. Thanks Lee Rewell
  2. Hello I am using the JasperClient c# library to call the report webservices. When I pass parameters that are in a list and indicate this by setting the value to true the report does not work correctly. I have set up a parameter as follows Parameter Name A Parameter Class Type java.util.Collection In my report query I have this statement WHERE contractdate::date BETWEEN $P{startDate}::date AND $P{endDate}::date AND value IN $P{A} This is the error I get com.jaspersoft.jasperserver.api.JSExceptionWrapper: net.sf.jasperreports.engine. JRException: Incompatible java.lang.String value assigned to parameter A in the ReportByDate dataset. I have seen on the forums this solution Create another parameter B of type java.lanfg.string with this default expression org.apache.commons.lang.StringUtils.join($P{A}.toArray(),",") However I cannot get this to work either. What is it I am doing wrong? Any help much appreciated. Thanks Lee
×
×
  • Create New...