Closed danielpeintner closed 1 week ago
A similar question has been asked on our forums here: https://community.jaspersoft.com/forums/topic/68669-is-there-a-way-to-programmatically-convert-jasperreports-6x-jrxml-templates-to-version-7x/
Reiterating here the possible ways to address this going forward:
1) Users having JRXML 6 reports can use JSS CE 7 on their own to convert the files to JRXML 7 before providing them to the application that allows running them;
2) The application running the reports would not need to convert the JRXML files provided that it uses the JasperReports Library Professional/commercial version. This version is not released yet but is planned to be released soon. This distribution of our software will have the ability to work with older file formats.
3) Continue using version 6 of JasperReport library and Studio.
I hope this helps. Teodor
This conflicts with the open-source ethos of transparency and collaboration. The library it is tied to JasperReportsStudio and it shouldn't be as this violates the spirit of Open Source. There should be a utility to convert old JRXML files as part of this library.
FYI I just ran into an issue where JSS CE7 didn't convert physical JRXML file but I could see the changes in the source tab.
JSS CE 7.0.1 release is available here: https://community.jaspersoft.com/download-jaspersoft/community-edition/jaspersoft-studio_7.0.1 I bring it up just because it might solve the issue with the conversion of physical files mentioned above.
Thank you, Teodor
Can you describe what has changed or how it is meant to work. The link you shared doesn't give any insight.
I tried to load an old jrxml file with version 7.0.1
but I still get
net.sf.jasperreports.engine.JRException: Unable to load report
So I assume it does not automatically convert old jrxml files to the new version.
Where are you getting this exception? In Jaspersoft Studion CE 7.0.1? Or in the application where you deploy the JRXML?
Thank you, Teodor
Where are you getting this exception? In Jaspersoft Studion CE 7.0.1? Or in the application where you deploy the JRXML?
My use-case is (as mentioned above, see https://github.com/TIBCOSoftware/jasperreports/issues/468#issue-2453484198) is that users still have old jrxml files on their disks etc.
If I update in my application to version implementation 'net.sf.jasperreports:jasperreports:7.0.1'
such users can no longer load their jrxml files. They would need to open the JRXML in the JasperSoft Studio and "convert" it manually.
Hence, I was asking whether there is a way that either
I hope this makes clear what I (and I think many others) would need since there are many applications out there that used the old format...
Hence, the error Unable to load report
comes from an application that updated its dependency to 7.0.x
I only announced here the availability of JSS CE 7.0.1, which is the tool to manually convert JRXML files mentioned in my numbered list above at point 1. I thought you tried it and it did not work for you.
Sorry for the misunderstanding. I have nothing to add to my initial reply on this thread.
Thank you, Teodor
The v7 Change Log mentions the following
This means that users still having old *.jrxml report template files needs to start Jaspersoft Studio 7 to convert the file accordingly. One the other hand, there is code that allows converting one version to the other (which is great 👍).
Anyhow, I was wondering whether this functionality could be made available with the library itself, meaning that either automatically convert old JRXML or offer a function call that can convert the file if needed.
Use-case: An application might offer to users providing JRXML files on the fly. The use-case is that users still have v6 JRXML files that could be selected for a printout. With the new version 7 compiling fails. Having a way to detect, we could convert if we get provided an old v6 JRXML file.
I think this would be a great addition.