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

use variable to create record number


hensa

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Just create a variable for "Item" by going to "View" -> Variables -> [ New ]. Set the Variable Class Type to java.lang.Integer, set the Calculation Type to "Count", and set the Variable Expression to:

 

 

new Integer(0)

 

 

Then, make a field for your variable on the report.

 

 

It will then auto-increment like you want.

Post edited by: JayLink, at: 2007/10/05 21:34

Link to comment
Share on other sites

thanks for reply,

 

but, it only shows "1" on all the records.

 

Group FielXX

Item Field1 Field2

 

1 XXX XXX

 

1 XXX XXX

 

1 XXX XXX

 

1 XXX XXX

Group FielXX

Item Field1 Field2

 

1 XXX XXX

 

1 XXX XXX

 

1 XXX XXX

 

1 XXX XXX

 

any suggestion, why happens that?

Link to comment
Share on other sites

already I solved my problem

 

just I create variable called ItemV

 

 

Variable Class Type

java.util.Integer;

 

Calculation Type

Sum

 

Reset Type

Group

 

Reset Group

AnyGroup

 

Variable Expresion

new Integer(1)

 

Initial Value Expression

new Integer(1)

 

 

thanks for help

Post edited by: hensa, at: 2007/10/06 08:07

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