Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Migrating_Jasper_Reports  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I need to migrate from Jasper reports 4.5.1 to Jasper reports 6.4.3. There is many already created and working .jrxml reports.

However i have a problem because it is not possible now to load it to JasperReport object using loadObjectFromLocation(String) (method is deprecated and not exists at all), and then set parameters and generate report.

What is now in Jasper 6.4.3 best way to load .jrxml files from location, point is that all old .jrxml files should work without much change.

Thanks in advance.
 
Greenhorn
Posts: 20
Fedora IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nenad,

I also have reports created in version 4.5.1 and also in older ones.
So I tried update JasperReport library in my applications on version 6.4.3 and for me everything works and generated result form 6.4.3 library is the same as was when using older library.
But I don't use loadObjectFromLocation(String) method. In which class is it located?

I load reports in this way if compilation is not needed:

... or this way if compilation is needed:

JasperFillManager.fillReport() and JasperCompileManager.compileReport() takes not only InputStream (as in my case) but also String for file name.


What I realized when migrating is that JRExporter interface is deprecated so instead of this:

I should do it like this:

I hope I helped you at least a little bit.
Lukas
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!