caroline.darmon Posted December 16, 2016 Posted December 16, 2016 Hello,I have a problem with details values of crosstab, which I want blank if null.I checked the corresponding option (blank if null) and, at this point, no problem.But when I set the total as an average calculation, relative null values were replaced with 0 instead of blank.In my case, this is a real problem for understanding this report !How could I have a blank value in this case ?Thanks for your response
sanbez Posted December 16, 2016 Posted December 16, 2016 You can realize incrementer on java which return null (or your own specific object in terms of java) instead zerohttp://www.jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/fill/JRExtendedIncrementer.htmlhttp://www.jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/fill/JRExtendedIncrementerFactory.htmlBut...There are few information about realization of such classes in internet and documentationAnd this way not for newbies imhoI guess you have choose the easier way. For example you can calculate count not null values on column (row?) of crosstab and hide sum variable if this count = 0see here http://www.stackoverflow.com/questions/23473887/count-number-of-rows-where-a-field-is-a-specific-value/23491357
caroline.darmon Posted December 16, 2016 Author Posted December 16, 2016 Thanks Sanbez for your answer,This is interesting, but my problem is not on the total column but with the print of 0 in detail cell in case of null value (see the my comment above).Is it possible to print blank instead of 0 ?
caroline.darmon Posted December 20, 2016 Author Posted December 20, 2016 For example, this is my crosstab : 2016-012016-022016-032016-04AverageType 1amount3null364 variationnullnull03 percentagenullnull0%100% Type 2amount500null250750500 variationnullnull-250500 percentagenullnull-50%200% The data row with "average" as total calculation is print with 0 instead blank for null values : 2016-012016-022016-032016-04AverageType 1amount30364 variation 03 percentage 0%100% Type 2amount5000250750500 variation -250500 percentage -50%200% If the average is print with 0 for a row with blank value only, it's ok.
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