Jump to content

REPORT_COUNT not counting logically


mattreport

Recommended Posts

I'm using the $V{REPORT_COUNT} function in iReport to generate row numbers per ID, but when an ID has more than one Value it is using the rows to add to the row count giving the current output below.
 
Current Output
 
Row Number IDValue
123A
265N
389P
434B
  Q
  A
777B

 

 
 
 
 
 
 
 
 
 
 
 
 
I want the output to be like the below with each row number only incriminating by ID
 
$V{REPORT_COUNT} Settings
 
Print Repeated Values is TRUE
 
Evaluation Time is NOW
 
Desired Output
 
Row Number IDValue
123A
265N
389P
434B
  Q
  A
577B
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi,

 

Here is a resolve for your query.

You Really can't use $V{REPORT_COUNT} as it count all the number of rows in the report and the value cannot be manipulated as this is an inbuilt variable

But a workaround for you would be, that create Report Group Based on ID  and create a variable that just counts ID , set Increment Type to Group --> (ID) and Reset Type is set to Report

This will count the unique ID's 

After this you can move  Rownumber, ID and Value in the Group Header

and put Value in the detail band though the value text field in the detail band will have the Print When Expression: $V{ID_Count} != 1 (This will remove the repetition)

And ofcourse use the variable you created earlier based on the group as the serial number

This will give you exact desired output .

Hope that this works.

 

Thanks
Ankur Gupta
http://ankurthetechie.blogspot.in/

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