Version Control of reports with JasperSoft Server

5

Hi. I hope some of you have figured this out. That would be awesome :-)

I would like to have some version control over my server repository. I know that I can use export. But that solution seems mostly useful only for backup.

I can't use the export because :

  • files ends in .data instead of .jrxml, .png, etc.
  • when editing in JasperSoft it instantly adds uuid's to each node and 4-5 lines of metadata in the top of the file.
    • So even if one just looked in the file it will be marked as changed and I will have to do a thorough diff of the xml-file before committing (or reverting). 

I would like to find a solution to enable :

  • better collaboration across team members
  • easier work shared resources such as graphics, subreports, content and other files (linked resources)

When working locally, I want to mimic the structure of the repository. That seems essential when working with referenced resources. Somehow JasperSoft Studio handles linked datatypes and input controls. But not subreports and images, etc. At least not very well. 

If I just open the server connection and starts working on a report, then subreports are not available before they have been opened as well. That is unles they are local to the main report, and that was not my goal. I want to be able to reuse subreports, etc. And every time the studio has been closed you will open the report again and it creates a new tmp-folder for the server, and you can start over downloading images, etc.  Take a look for youself in your project explorer and see how many copies of server-folders you have.

If I start to create a new report then I have the same problem. But even more so if I don't mimic the repository structure. I want to add a new report at the right place. For if I don't, then the reference-paths will be substantially different.

I can handle path differences like this:

(($P{REPORT_CONTEXT}!=null)?"repo:":"") + "/images/logo/somelogo.png

That is assuming that I have created a local copy with /images/logo/somelogo.png (It should be noted that newer servers can handle paths without the "repo" part, so I am looking forward to upgrading my server.) And it also explains why I want to have the initial structure in my workspace.

There is another problem when uploading from within studio. It will try to consolidate all resources together with the main report. So if I am not careful, then I will have multiple duplicates of my translation bundles and everything else.

In the end my question is if anyone has a sound way to do collaboration and shared resources?

jsi_1's picture
39
Joined: Jul 15 2013 - 4:42am
Last seen: 1 year 11 months ago

7 Answers:

0

I think the main problem is with connecting Studio with JasperReports Server. Just keep the files in a svn repository to share and build a script to upload to the server. JasperReports Server updates the reports in realtime and this isn't what needed in the first place in my case. With the script, it's possible to schedule the updates.

hozawa's picture
40723
Joined: Apr 24 2010 - 4:31pm
Last seen: 45 min 37 sec ago
1

Hi hozawa

Thanks for your answer. We have a test server and a production server. Schedule is not an issue.
One of the big benefits of the combination of JasperSoft Studio and the JasperSoft Report Server is that less tech savvy people can produce and deploy a report. 
We could live with the fact that they would have to activate a script, but it does not address any of my pains.
  • Handling of references to subreports, images, etc. when they are shared among multiple reports.
  • Any file is rendered as changed even if one just looked inside it.
 
jsi_1's picture
39
Joined: Jul 15 2013 - 4:42am
Last seen: 1 year 11 months ago
0

The problem with reference is happening because users are opening reports from the server repository instead of from a svn.

JasperReports Server has numerous problems. I may be better to move on to something like Liferay and create your own reporting portlets.

hozawa's picture
40723
Joined: Apr 24 2010 - 4:31pm
Last seen: 45 min 37 sec ago
0

Hi hozawa

Thanks for your input and involvement smiley. I think that the benefits with the current solution outweights the time and money it will cost to create anyting remotely as capable, resource managing, efficient and flexible on our own. Think about creating a new rest api, folder structure, handling of data connections, users, temporary files, scheduled reports, smart caches, a complete administrative interface, not to mention plugins for Eclipse, and a whole lot more. I'm probably better of contributing to the community or simply buying support.

I suspect that a fair part of our trouble is due to the fact that we have yet to find out what is best practice and the best workflow.

Yesterday I realised that some problems is because we are still running a 5.2.0 server. Lots of optimisations and bugfixes have come into version 6. Also JasperSoft Studio is not working right with 5.2.0 but seems much more flawles together with server version 6.x

One trick to handle references seems to copy images, subreports etc. and "paste as link" where the main report is. Then the report uses these "local" resources which really is links. One great benefit is that the server automatically updates these links; if you "cut" an image and then "paste" it somewhere else, then the links gets updated. 

I have yet to do some more testing with this practice, but it seems promising.

I think that there are two scenarios where we have to work out best practice:

  • Create a new complex report using shared resources
  • Collaborating on an existing report.

 

 

jsi_1's picture
39
Joined: Jul 15 2013 - 4:42am
Last seen: 1 year 11 months ago
0

After much more experience, recommend using git for version control. Then use Jenkins for build and upload to JasperReports Server.

Developing reports on JasperReports Server is good only for a very small project where versioning control is not necessary.

hozawa's picture
40723
Joined: Apr 24 2010 - 4:31pm
Last seen: 45 min 37 sec ago
2

hozawa,

How do you use Jenkins for deployment of reports to JasperReports Server? I'd appreciate your insight. Thanks!

pjacekm's picture
24
Joined: Feb 17 2017 - 7:07pm
Last seen: 7 months 2 weeks ago
1
@hozawa I second that reqeust. How do you use Jenkins for deployment with Japser? Thanks.
andrew.withey's picture
Joined: Sep 17 2015 - 1:46am
Last seen: 1 year 7 months ago
Feedback