Click here to Skip to main content
11,932,677 members (61,226 online)
Rate this:
Please Sign up or sign in to vote.
See more: Java
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

Posted 26-Mar-13 21:38pm
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 ( as well.
NIl Code 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 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)
Nielcode 29-Mar-13 3:30am
thanks for both of u for reply,but vishal i already tried what u told,i did same i stored the result in a variable n tried to pass to another textfield but it gaves me error after compilation

let me tell u both,i tried by using parameter, variable n textfield also but i failed

so if u have any other ways plz let me know abt it

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 27 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100