mohammad_awadat Posted November 12, 2007 Share Posted November 12, 2007 I HAVE FOUR FIELDS 1 - DEPOSIT TYPE IF (DEPOSIT_TYPE == 1){ CASHTYPE = AMT} ELSE IF (DEPOSIT_TYPE ==2){CHECKTYPE = AMT} ELSE IF (DEPOSIT_TYPE ==3){CREADITCARDTYPE = AMT} CAN ANY ONE HELP ME Link to comment Share on other sites More sharing options...
martynhiemstra Posted November 12, 2007 Share Posted November 12, 2007 Help you with what? What is your question? Link to comment Share on other sites More sharing options...
diogoveloso.82 Posted November 12, 2007 Share Posted November 12, 2007 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 More sharing options...
mohammad_awadat Posted November 13, 2007 Author Share Posted November 13, 2007 who can write as expression and where must set this expression if i have four filed and i want take value from amt field and set in another three field Link to comment Share on other sites More sharing options...
mohammad_awadat Posted November 13, 2007 Author Share Posted November 13, 2007 who can write as expression and where must set this expression if i have four filed and i want take value from amt field and set in another three field Link to comment Share on other sites More sharing options...
martynhiemstra Posted November 13, 2007 Share Posted November 13, 2007 You can't set the value of another field. You cant call the fields and set there values. You'll have to alter the data from the datasource to allow this. Link to comment Share on other sites More sharing options...
mohammad_awadat Posted November 13, 2007 Author Share Posted November 13, 2007 you can help me to do that thank you Link to comment Share on other sites More sharing options...
martynhiemstra Posted November 13, 2007 Share Posted November 13, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now