solene.masseron Posted November 22, 2022 Share Posted November 22, 2022 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 Link to comment Share on other sites More sharing options...
Scott Andesen Posted November 22, 2022 Share Posted November 22, 2022 Both answers are yes, this can be done. Are you using Jaspersoft Studio? Or is this using Ad Hoc? Link to comment Share on other sites More sharing options...
solene.masseron Posted November 23, 2022 Author Share Posted November 23, 2022 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 Link to comment Share on other sites More sharing options...
Scott Andesen Posted January 17 Share Posted January 17 In the Variable "Expression" are you putting the IF logic? Remember that the results of the expression needs to match the Variable field type.Post a jrxml file if possible. Link to comment Share on other sites More sharing options...
solene.masseron Posted January 25 Author Share Posted January 25 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now