Jump to content

Built-In Crosstab Total Variables


AlGarrison

Recommended Posts

I'm trying to use the built-in crosstab total variables that are defined in chapter 14 of "The Definitive Guide to JasperReports" to show percentages in my crosstab report (It is also listed in Chapter 15 of "The Definitive Guide to iReport"). 

In my specific example, I have F3_OrderDate__Sum__Quantity as a measure field and F1_CategoryName as a column group.  I'm trying to divide F3_OrderDate__Sum__Quantity by F3_OrderDate__Sum__Quantity_F1_CategoryName_ALL, which is what the name of the built-in crosstab total variable should be based on the description in "The Definitive Guide to JasperReports"  I get a JRValidationException when trying to compile the report

1. Variable not found : F3_OrderDate__Sum__Quantity_F1_CategoryName_ALL

After that, I just tried something similar in iReport, where I created a cross tab and then used the expression editor to generate my expression.  The expression editor expression, which was generated by double clicking on objects in the crosstab section, looked just like the expression I had created.  When I clicked on the "Check Expression" button I got the same error

Variable F3_OrderDate__Sum__Quantity_F5_Year_ALL not found!

I have attached 2 copies of my .jrxml file.  One does not contain the percentage calculation and the other one does.  The one with the percentage calculation does not seem to load in ireport

Is there a workaround to allow me to calculate the percentages that I want?

Link to comment
Share on other sites

  • 2 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...