Jump to content

Recommended Posts

Posted

How to create custom hyperlinks in jasper reports from java itself.

There is enough information in creating hyperlinks from design file but in my program I have nothing in design file, I am filling it from java like this.

JRDesignTextField txtField = getJRDesignTextField( x, 0, width, 30, normalFont, new Color(255,255,255), new Color(0,0,0), JRTextElement.HORIZONTAL_ALIGN_LEFT, JRTextElement.VERTICAL_ALIGN_MIDDLE );
JRDesignExpression exp = new JRDesignExpression();
exp.setValueClass( String.class );
exp.setText("$F{"+ displayName +"}");
txtField.setBox(box);
txtField.setExpression( exp );
detailBand.setSplitAllowed(false);
txtField.setPrintWhenDetailOverflows(true);
txtField.setPrintRepeatedValues(true);
txtField.setPrintInFirstWholeBand(true);
detailBand.addElement(txtField);
 
and similarly I want to create hyperlinks in these textfields along with the anchor tags.
If any small demo program is there than It would be very benificial for me.
Thanks
  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...