Jump to content
Changes to the Jaspersoft community edition download ×

Problem with COUNT in groups


Recommended Posts

By: Carole Song - miyu76

Problem with COUNT in groups

2002-11-11 14:15

Hi,

 

This is an unrelated question to my previous one.

 

I have a report that is grouped first by clients and then by waybill numbers. In my summary, I am trying to total the number of clients in the report, however I get the total number of waybills instead. I am wondering if this is a bug or if I am formatting my XML incorrectly?

 

Here are my two groups:

 

<group name="DeliveryToGroup" isResetPageNumber="false" isReprintHeaderOnEachPage="true" minHeightToStartNewPage="200">

<groupExpression>

$F{pickupdel_id_to}

</groupExpression>

<groupHeader>

...

stiff

...

 

</groupHeader>

<groupFooter>

<band height="0"/>

</groupFooter>

</group>

 

 

<group name="WaybillGroup" isReprintHeaderOnEachPage="true">

<groupExpression>

$F{waybillnumber}

</groupExpression>

<groupHeader>

...

Stuff

...

</groupFooter>

</group>

 

 

 

And this is the code that was used to call the group I want to retrieve the count from

 

<textField evaluationTime="Report">

<reportElement x="160" y="35" width="90" height="15" backcolor="#DDDDDD" mode="Opaque"/>

<textElement textAlignment="Center" lineSpacing="Single">

<font reportFont="Arial_Bold" size="12"/>

</textElement>

<textFieldExpression class="java.lang.Integer">

$V{DeliveryToGroup_COUNT}

</textFieldExpression>

</textField>

 

 

but I'm getting the WaybillGroup_COUNT instead.

 

 

 

 

Thanks for your help,

Carole

 

 

 

By: Teodor Danciu - teodord

RE: Problem with COUNT in groups

2002-11-13 13:28

 

Hi,

 

The DeliveryToGroup_COUNT variable will display

the number of records found in the last client group.

 

What you need is a special variable like the

"CityNumber" variable found in the "datasource"

or the "scriptlet" samples.

 

Good luck!

Teodor

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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...