Jump to content
We've recently updated our Privacy Statement, available here ×

Where to find the stretch with overflow property in Jasper Studio?


ml.francis

Recommended Posts

Hi, I want to create a text field where multiple lines can be possible depending on the text passed to it from the database, sometimes the text can be long so more than 1 line is required. I did some digging in google and it seems that I should check some property called "stretch with overlow" in the field properties, but I clicked my field and checked properties and that "stretch with overflow" property/checkbox is nowhere to be found in Jasper Studio. All I can find is Detail Overflows, Stretch Type, and Text Adjust. None of those solved my problem. I tried using Text Adjust and selected the Stretch Height property, it seemed to be the closest to what I want but an error comes up when I generate my report in my Java app:

Parse Error at line 233 column 42: cvc-complex-type.3.2.2: Attribute 'textAdjust' is not allowed to appear in element 'textField'.

am I doing something wrong? I need a dynamic text field to display my data and adjust it's height depending on the length of the text passed to it. How can I do this in Jasper Studio? Thanks.

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I am interested in what your error means too. I recently upgraded to 6.13.0 from 6.6.0 and all reports I had made in 6.6.0 that are imported to 6.13.0 now have the same error message you are getting -

"Parse Error at line 233 column 42: cvc-complex-type.3.2.2: Attribute 'textAdjust' is not allowed to appear in element 'textField'."

I have to change the line in the source to read </textField> for my report to run now.

Link to comment
Share on other sites

I solved it by getting the new Jasper Report .jar file and the latest version of commons collections .jar file. I get to run the report in intelliJ but when I run it from the executable .jar file the whole JPanel doesn't load at all. I tried to narrow down the problem it seems that if I compile a jasper report the jpanel in my java app just won't load. I still don't know what's wrong, I'm guessing it's another compatibility issues with the .jar libraries but I updated all the commons .jar and no luck, the jpanel still doesn't load in the executable .jar file. but if I comment out the compile line in my code the jpanel loads. Strange.. I wonder if anyone knows the answer to this..

this is my code:

JRDataSource jrDatasource = new JRBeanCollectionDataSource(dataSource);JasperReport report = null;try {    //InputStream url1 = getClass().getResourceAsStream("./giovanni_requisitionslip.jrxml");    //JasperDesign dis = JRXmlLoader.load(url1);    report = JasperCompileManager.compileReport(getClass().getResourceAsStream("giovanni_requisitionslip.jrxml"));    //report = JasperCompileManager.compileReport(dis);    JasperPrint filledReport = JasperFillManager.fillReport(report, parameters, jrDatasource);    pnl_center.add(new JRViewer(filledReport), BorderLayout.CENTER);    pnl_center.repaint();    pnl_center.revalidate();} catch (JRException jrException) {    jrException.printStackTrace();}

 

Link to comment
Share on other sites

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...