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.
Count All on any field in the result that always has a value - like an id - would do it.
Re: answer from swood_1
I 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?
@swood_1 see above