Click here to Skip to main content
16,017,193 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everyone,

i m doing a jasper report wherein i have 2 textfields ,out of 1 field (x) have some textfield expression say sun of two parameters and another field (y) have a java class function which accepts this sum for further work
now i want to pass x fields value/ output to y field's java fucntion as a parameter
but i m unable to do so, i googled for same but no any relevant result i found
i cant access x field as parameter to y field as it dont have any id or name.

i tried by taking one customized field(n) and assigned x value to this n field and then passed this n field to y field's expression, but when i compiled i got error like:
no column name n found......and its obvious coz the fields came in report are from query

so will anybody help me on this probelm?

do reply plz..its urgent one

Regards,
Nil
Posted
Comments
Prasad Khandekar 27-Mar-13 2:54am    
Have you tried using iReport Designer or Jasper Wave for Jasper. Try using the expression itself as the parameter. Please have a look at this tutorial (http://www.java-samples.com/showtutorial.php?tutorialid=851) as well.
Nielcode 27-Mar-13 3:15am    
@ prasad : thanks for quick reply....but let me tell u m doing jasper report by using ireport designer itself,i saw ur link given here, but in that those two fields which are concanated are came from query result i,e, from dataset....according to my question i used Textfield from pallate not from fields resulted from query...so plz tell me how do i pass one textfield to other textfield
Prasad Khandekar 28-Mar-13 1:51am    
But data needs to come from somewhere. Why will you use it otherwise? I don't think you can do this. You can reference Fields $F{ or variables $V{ while constructing an expression.
vishal.v.patil 28-Mar-13 6:34am    
its needs a variable.... see ..Get the sum or whatever u r expression result in some variable called variable1 and display in textfield(x) and after that use this variable as a parameter to the java class function which is for u r second textfield(y)... and after that it gave any error then check the data type or variable expression.
Nielcode 29-Mar-13 3:27am    
@ Prasad: i know data has to come 4m smwer ,sorry but as i asked in my question i have calculated total amount in x textfield and that field i want to pass an another textfield(y)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900