beverleym Posted September 10, 2019 Share Posted September 10, 2019 I am fairly new to JasperReports Server, but I'm getting the hang of it overall. However, one thing is confounding me. I cannot figure out how to get a count of records in a cross tab.For example, my Incident domain contains fields for Region and Type, and a measure for Size (amongst other things).I can create a crosstab that gives me the total (or average) size for incidents per Type across the top and Region down the left... but I cannot figure out how to get it to give me the total number of incidents in each. Size is an optional field, so when I try putting it with Count All, I only get the number of non-null records, but I need the full total.I figured out what feels like a hack - I put a calculated measure with a formala of "1" and then used Sum on that field, but that seems like the wrong thing to do.Any help appreciated. We're on version 7.0 right now but are about to update to 7.2. Link to comment Share on other sites More sharing options...
swood_1 Posted September 12, 2019 Share Posted September 12, 2019 Count All on any field in the result that always has a value - like an id - would do it. Link to comment Share on other sites More sharing options...
beverleym Posted September 12, 2019 Author Share Posted September 12, 2019 Re: answer from swood_1I considered using Count All, but the problem with that is, unless I'm missing a different thing, it comes in REALLY ugly. So in my results instead of saying something like "Number of Incidents" I get "Incident Primary Identifier (Count All)"Is there a way in an ad-hoc view to rename a field? Without creating calculated field of a different name that points to the original field and is just as much work as my original hack? Link to comment Share on other sites More sharing options...
beverleym Posted September 18, 2019 Author Share Posted September 18, 2019 @swood_1 see above 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