2004 IR Help Posted August 23, 2006 Share Posted August 23, 2006 By: urza23 - urza23 How to set textfield position by parametr 2005-08-17 02:05 Hello, I have a problem and I realy dont know how to solve it, maybe somone of you can help me. Im a beginner with jasperreport, so maybe its a dump question, dont know.. Is it possible to somehow set textfield position (or report margins) by parametr? I hoped in something like this: <textField... > <reportElement .. x=<![CDATA[$P{HORIZONTAL_OFFSET}]]> .. but it deos not work. The situation: Im using reports for prints. I prit into forms on paper, so the elements must be positioned preciesly. But some printer simply print a few milimeters aside, so I need to allow user to set this "offset" somehow.. I can change the positon in XML and then compile it, but its VERY SLOW solution, I dont want to do it this way unitl its necessary. By: Lucian Chirita - lucianc RE: How to set textfield position by parametr 2005-08-18 01:21 Hi Using expressions for element position is not supported. One solution to your problem is to modify the JasperPrint object before printing by adding the offset to all elements. HTH, Lucian By: alanHardwick - alan314 RE: How to set textfield position by parametr 2005-08-19 05:31 Maybe you could use a little trick...(Similar to the dynamic element formatting trick as explained in the below URL). i.e. Place your text field multiple times in your report in all possible positions and use the PrintWhenExpression parameter to decide which one of those text fields you want to display (based on your HORIZONTAL_OFFSET parameter of course)... Should work!! http://jasperreports.sourceforge.net/tips.tricks.html By: C-Box - c-box RE: How to set textfield position by parametr 2005-08-19 12:32 Doesn't the global OffSetX and OffSetY parameters fullfill your purpose???? See my old RFE here.... https://sourceforge.net/tracker/index.php?func=detail&aid=949111&group_id=36382&atid=416706 it's included since there and works like a charm! hth C-Box 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