Jump to content
Changes to the Jaspersoft community edition download ×


  • Posts

  • Joined

  • Last visited

solene.masseron's Achievements


Apprentice (3/14)

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

Recent Badges



  1. I have a table with a dormant stop field with yes/no values and I would like to count the yes value number and the no value number. I have created a parameter as attached: The problem is that I encounter this error message and I don’t know how to get around this problem I tested these various formulas but I still encounter the same problem. help me.
  2. Hello everyone, I have a stop data stored in a postgres database from which I create a report. In this data I have a column that stores yes and no values I would like to count by municipality. I created a variable a parameterized variable as below the problem is that I have an error message like the following image and I don't know what to do. I am a beginner on this software if anyone has an idea with great pleasure =) net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $V{countNo} at com.jaspersoft.studio.editor.preview.view.control.ReportController.fillReport(ReportController.java:551) at com.jaspersoft.studio.editor.preview.view.control.ReportController.access$18(ReportController.java:526) at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:444) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $V{countNo} at net.sf.jasperreports.engine.fill.JREvaluator.handleEvaluationException(JREvaluator.java:294) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:328) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:673) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:641) at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:1173) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:555) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:540) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:383) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:548) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2600) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeader(JRVerticalFiller.java:662) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeaders(JRVerticalFiller.java:558) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:264) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:110) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:621) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:135) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassCastException: Cannot cast java.lang.Integer to java.lang.String at java.base/java.lang.Class.cast(Unknown Source) at net.sf.jasperreports.compilers.JavaDirectExpressionValueFilter.filterValue(JavaDirectExpressionValueFilter.java:47) at net.sf.jasperreports.compilers.StandardExpressionEvaluators.filterValue(StandardExpressionEvaluators.java:177) at net.sf.jasperreports.compilers.StandardExpressionEvaluators$VariableEvaluator.evaluate(StandardExpressionEvaluators.java:280) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:309) ... 15 more
  3. Hello , Thank you for your answer, but he does not calculate the sum of the values. He does a count. Knowing that in the variable in the calculation tab there is sum. Thank you for your help
  4. Hello everyone I’m a little desperate. I try to sum up the number of yes and no that there is in my transport stop table that is in database and I do not understand what is wrong with it. I created a variable configured this way: name value class: java.lang.integer calculation: sum expression:IF($F{arret_dorm} ="Non",1,0) intimate value expression: 0 increment type: none type réinitialisatio common group and then I put this variable in the header detail, knowing that I have a band. The problem is that it always appears 0 as a value. If I set 1 to the initial value, it remains 0. I’m not sure what to do any help will be welcome
  5. Good morning, I apologize for my late response time I tested your solution. Attached is the picture of the parameters . I have a problem with my initial text field because I want to convert text to whole . I can’t convert this field to a whole. Help =)
  6. Hello everyone, If I may, I would like to ask you because I would like to count the active or non-active numbers. This data is characterised by the number of Yes and No per municipality. I created a common group and a variable to compatbilise. I set the variable as follows: calculation: sum expression:IF($F{arret_dorm}=="Oui",1,0) initial value expression:$F{arret_dorm}.getValue.parseInt(Oui,1) the problem is that the entire transformation is not happening and I don’t know how else to do it. HELP
  7. Good morning, I am attaching you to an image of my capture of the variable. I made a if starting from the expression that if stop dormant == "No", set it to 1, otherwise 0. The calculation I put the sum. However it is in my inital expression that I am not . I can’t find in the intial expression that we start from zero, so that the sum works. If someone has already done it I am a taker of the method . =) Thanks for the help
  8. Thank you for returning. I use Jaspersoft studio. For the first I used a variable with as calculation "count" and value class name "string". However for the second one as soon as I put an expression "$F{arret_dormant} == "No" it puts me an error message is that I must do otherwise than by a variable? thank you for your help
  9. Good morning, I want to do a report on the number of transit stops per municipality. This database contains only text values. I am new to this software and I was wondering if it was possible to count the number of canton? And my second question is that it is possible to count according to a condition, that is to say to count by canton the number of active or not (format column text) Thank you for your help
  • Create New...