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

EXPRESSION


mohammad_awadat

Recommended Posts

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi again ... martynhiemstra i´m kind following you.. kkkkkkk ....... maybe mohammad_awadat you want the expression for ireport..i think..if it is next time be more especific...and try this one..

 

(F${DEPOSIT_TYPE} == 1) ? CASHTYPE = AMT : (F${DEPOSIT_TYPE} == 2) ? CHECKTYPE = AMT : CREADITCARDTYPE = AMT

 

but be more especific what kind of field you have..in what king of text you wanna show your value... and what you really want to do....this way all can help you better...as i know you cant a sign to you field values...

Link to comment
Share on other sites

It depends on what kind of datasource you are using. If you are using a resultset datasource then it isnt possible. You will have to create your own datasource that extends JRDatasource.

http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/JRDataSource.html

 

I realized that it's also possible to do it differently. You can also set the print when expression field for the 3 different fields. The first field can be set to F${DEPOSIT_TYPE} == 1. The second field set to F${DEPOSIT_TYPE} == 2 and the third field set to F${DEPOSIT_TYPE} == 3. This will print the correct field according to the F${DEPOSIT_TYPE} field

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