When we export a crosstab we cannot expand the totals columns like in the ad-hoc.
In Jaspersoft studio report as crosstab wants to add a calculated column to that, but cannot do that either.
Release : 16.1.2
This interactive feature however is only made available in JRS Ad Hoc Designer for ad hoc view editing. When saving or exporting the ad hoc VIEW into an ad hoc view REPORT, users lose the interactive feature. The report is merely a snapshot of the ad hoc view in that particular expanded display state and the crosstab cell expansion ceases to function after the view to report transformation.
Jaspersoft Studio (JSS) is a designer tool to only create report, not view, of a crosstab, therefore does not support interactive measure sub group expansion/contraction operations.
Workaround:
As for the JRS ad hoc view using a calculated function or measure, this measure must be predefined as a custom domain DB specific SQL function in JRS deployment (applicationContext-semanticLayer.xml) in order to use it in the domain ad hoc view and report.
To use this "calculated column" in JSS, users can code their report SQL query in a similar way with a subquery to produce the result field and use it in the report.