I have created a subdataset in my main report and using that to create a list. The list displays all the rows from my dataset, but is there a way to place a total number of rows count in the list component.
With the $V{REPORT_COUNT}
variable, i can get the total count but its repeated multiple times (as the number of rows in the sub dataset )
Create A second List set it to use the same dataset and put only the
$V{REPORT_COUNT}
in it. Set the position type to floatSecond option is to use the Table in place of the List as it has the banding to allow for a header or footer of your dataset
As noted in the answer by user jmurray here: http://community.jaspersoft.com/questions/514827/row-count
In your
subDataSet
, create a variable:Then somewhat like what Mike Noland has in his answer, create a list that points to the same
subDataSet
as the original list with atextField
:This creates a zero based counter that holds the total count of items. Then by telling the report not to print repeats, you end up with a single item that represents the total number of items in your subDataSet