Jump to content
We've recently updated our Privacy Statement, available here ×

group no reset


csilva2001

Recommended Posts

<variable name="SUM_TBLRECEITA_VALOR_1" class="java.lang.Double" resetType="Report" calculation="Sum">

<variableExpression><![CDATA[$F{TBLRECEITA_VALOR}]]></variableExpression>

</variable>

 

Hi! to all. In my report a variable Calculation Type:-Sum. In report I get 2 lines:

line 1 = 750

line 2 = 1170

 

but in my database I have:

goup1 = 750

group2 = 420

 

I try put resetType="Group" but I recei a error message:

unknow reset group for variable..

 

Can you help me, please?

 

An embrace,

CarloSilva

Link to comment
Share on other sites

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

Hi!

I use iReport to create my Report files.

Create group

e.g.abcd.

In group expression of group keep the field name( the One which holds the values of 750 and 420)

then try again.

If that doesn't helps, then show/give me a sample of your database and the desire output then I might be able to give some clear solution.

 

The error you got was because you have not difine any group.

Try using iReport, you will be able to create faster and easily.

Link to comment
Share on other sites

Hi nitin403.

My problem is in problem.jpg.

Please, try help me.

 

TBL1

ID--------1----2---3------4-----5

PRODUCT---2----1---1------2-----3

PRICE-----25---32--55----30----20

 

TBL2

ID-----------------------1------- 2---------3

PRODUCT_NAME------MOUSE----PENCIL-----BOOK

 

I WANT:

 

MOUSE ------ 87,00

PENCIL------ 55,00

BOOK-------- 20,00

 

I hoop you understand.

 

An embrace,

Thanks

Link to comment
Share on other sites

Are you using iReport?

 

From what I see , this is not possible without using a group, also I don't know how are you using two table.

 

First sort the datasource by "PRODUCT".

Create a group called Product_Name.

In group Footer keep the PRODUCT_NAME and a variable total describe previously keep its reset type to group and Reset group to PRODUCT.

Hope that will help.

Just for information, what type of datasource are you using.

Link to comment
Share on other sites

Hi! csilva2001

Create another variable.

 

Lets say "PRODUCT_TOTAL".

 

The variable Expression keep "PRICE".

 

Check the datatype of "$F{PRICE}" if it is string, then keep "new BigDecimal($F{PRICE})" //Assuming field name of PRICE as PRICE

 

Keep calculation type as "sum"

 

Reset Type as Report.

 

And Increment Type as "none"

 

I hope this will help.

 

P.S. I don't know derby DB.

Link to comment
Share on other sites

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