Click here to Skip to main content
Rate this: bad
good
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
 
Regards,
Nil
Posted 26-Mar-13 21:38pm
Comments
Prasad Khandekar at 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.
NIl Code at 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 at 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 at 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 at 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 at 29-Mar-13 3:30am
   
@prasad;@Vishal:
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
Regards,
Nil

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

  Print Answers RSS
0 OriginalGriff 330
1 Sergey Alexandrovich Kryukov 279
2 BillWoodruff 245
3 Afzaal Ahmad Zeeshan 215
4 CPallini 205
0 OriginalGriff 5,635
1 DamithSL 4,496
2 Maciej Los 3,942
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 27 Mar 2013
Copyright © CodeProject, 1999-2014
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