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

New in iReport


richard_07

Recommended Posts

Hello to all, recently I start work with iReport.

So, my question is: I want to evaluate a field when this is printed with respect the previous field printed. Depending the value i show it or not. I mean, for example if the value of that field is equals to the previus i dont show it. I hope that you can understand me, my english is not very good but i try to search

information in the web about my problem and i dont find any solution for that reason

it is that i ask to you.

 

Thank you very much.

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

You could create a variable that contains the value of $F{f1} -previous.

 

Have the RESET TYPE set to Group -> Group that has group expression of $F{f1}

 

Change the evaluation time of the textfield that contains the variable, and then use the print when expression on the textfield.

 

Variable Name: previousValue

Class: (Same as $F{f1})

Reset Type: Group -> (Group Expression is $F{f1})

Calc Type: None

Initial expression: $F{f1}

Variable expression: $F{f1}

 

This or something similar to it should work...

Hope it helps...

Link to comment
Share on other sites

Thank you for your answers, I understand what I have to do, but you said to me:

 

"Have the RESET TYPE set to Group -> Group that has group expression of $F{f1}"

 

The problem is that I dont have any group in the report, I evaluate all the fields in the detail band. Is the same?

Link to comment
Share on other sites

So create a group.

Just set the height of the Group Header & Group Footer to 0.

 

You need the group so that you can reset the variable.

The group expression should be the field that you want to evaluate the previous value on.

So, when that value changes, (from previous to a new value) the group resets the variable...

 

Does this make sense?

Link to comment
Share on other sites

richard_07

 

Try doing this:

 

1) Right click on the text field (the one which you don't want repeating values).

2) Select properties & select the Common tab.

3) Uncheck the Print Repeated Values attribute.

 

This will suppress the printing of repeating values on your generated report.

 

 

edwin

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