tomsebastan Posted July 22, 2013 Share Posted July 22, 2013 I am creating jasper report without using jrxml template. I need to know how can we set how image in jasper title programmatically? ... //Title band = new JRDesignBand(); band.setHeight(50); textField = new JRDesignTextField(); textField.setBlankWhenNull(true); textField.setX(0); textField.setY(10); textField.setWidth(515); textField.setHeight(30); textField.setHorizontalAlignment(HorizontalAlignEnum.CENTER); textField.setStyle(normalStyle); textField.setFontSize(22); expression = new JRDesignExpression(); expression.setValueClass(java.lang.String.class); expression.setText("$P{ReportTitle}"); textField.setExpression(expression); band.addElement(textField); jasperDesign.setTitle(band); [/code] here instead of text field I need to add an image. What should I do? Link to comment Share on other sites More sharing options...
pssp25 Posted July 23, 2013 Share Posted July 23, 2013 Hi tomsebastan,Use a report parameter and insert the parameter as the report title.Kind regards,Paulo 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