tah Posted July 24, 2007 Share Posted July 24, 2007 Hello,I need to dynamically change my report design by doing the following:1- removing a text field from the detail band2- replacing it with one or more other text fields3- adding the necessary fields to match the text fields Step 3 can easily be done with myJasperDesign.addField(myJRField).However the closest I can get to doing the first two points is to find the JRDesignTextField in my detail band (myJasperDesign.getDetail().getElements()) but I can't remove it nor add anything else to the detail band. Any help would be appreciated. -Salah Link to comment Share on other sites More sharing options...
giroe Posted July 24, 2007 Share Posted July 24, 2007 Can't you use the: printwhen expression from your texftield? <printWhenExpression><![CDATA[new Boolean($V{VERSCHIL}.doubleValue() < 0)]></printWhenExpression> So if my variable VERSCHIL<0 my textfield will be printed. If not, it won't be printed :) Link to comment Share on other sites More sharing options...
lucianc Posted July 24, 2007 Share Posted July 24, 2007 tah wrote:However the closest I can get to doing the first two points is to find the JRDesignTextField in my detail band (myJasperDesign.getDetail().getElements()) but I can't remove it nor add anything else to the detail band. getDetail() will return a JRDesignBand instance when called on a JasperDesign object, so cast it to JRDesignBand and you will find methods for adding and removing report elements. HTH,Lucian Link to comment Share on other sites More sharing options...
tah Posted July 25, 2007 Author Share Posted July 25, 2007 Thank you very much Lucian that is exactly what I needed. I'll get to it right away. And thank you too Giroe but that is not what I was looking for. I have to change the whole detail band and add some new fields that I did not know about at design time :) -Salah Link to comment Share on other sites More sharing options...
michelr Posted March 17, 2009 Share Posted March 17, 2009 hello Salah can you show me the example that how i can remove field from the design... 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