kheaps Posted May 28, 2014 Posted May 28, 2014 I have a report in which each band is comprised of a handful of other subreports. Each subreport has a total at the bottom, in the same column as the numbers being totaled. I'm able to get a total at the bottom of the band through passing variables to/from the subreports, but I cannot figure how to write an excel formula that would count the correct number of cells and ingore the subtotals. (I'd like to write a formula in case the end user decides to change rows which cannot currently be populated from the database.)The best I can think of would be to "name" the subtotal cells, and then reference them by name, but I also cannot figure out how name cells using the jrxml.
kheaps Posted May 28, 2014 Author Posted May 28, 2014 An imperfect solution, for now - sum and divide by two:<propertyExpression name="net.sf.jasperreports.export.xls.formula"><![CDATA["SUM(OFFSET(INDIRECT(ADDRESS(1,COLUMN())),0,0,ROW()-1))/2"]]></propertyExpression>[/code]
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