Version Control with Jaspersoft Server Queries / Input Controls - jasper-reports

As anyone who has used Jasper Reports would know, a single report in Studio does not always encapsulate everything that a report is. There are Input Controls that can exist outside of the report as well as Queries that may be responsible for populating the controls.
Jaspersoft does not make it easy to obtain and version the entities that exist outside of the normal report JRXML files that you design in Studio. As of now, the only way I've been able to even somewhat accomplish this is like so:
Create Query and Input Control in DEV environment
Export the ZIP file that Jasper generates for said Query and Control
Extract the files and blow away or hand-modify the connection information in the Data Source, because Jasper packages everything associated with an item.
Add necessary files to SCM.
ZIP files up.
Import ZIP file in to QA environment, and then Staging, and so on.
While this can be somewhat automated, it seems like anyone working with Jasper has to jump through hoops to actually version their reports. Am I missing something, or is this really just the nature of things in this space?

Related

Is there a way to duplicate an entire report in pentaho report designer?

I am trying to re-vamp an already created report in Pentaho Report Designer and instead of starting over was hoping to duplicate the report and then make edits in the duplicated version. Is there a quick way to do this?
You have to do the normal procedure which you do for coping normal file. Copy the .prpt file and past in you machine and then open the file and start edit

JasperReports Server cant find sub reports

I have a main report which calls a sub report which calls another sub report.
I have all 3 in a dir called dash2 in report studio.
When I use report studios deployment to *JasperReports Server * on the main report, it also seems to deploy the first sub report (but not the sub sub report). Well, If I right click on the report and select edit, then Controls and Resources, it lists the sub report.
If i manually deploy all 3 reports one by one, I see all three in the report folder in Jaspersoft Studio. However, if I try to run the main report, I get:
Error filling report
net.sf.jasperreports.engine.JRException: Resource not found at : dash2/dash-kpi.jasper
So its looking for the sub report in dash2. So I created a dir called dash2 under the main report folder, and copied the sub reports into it. Same error. So I manually reproduced the same structure as in report studio -no joy. It can never find the sub report.
In the main report, it has this entry:
<subreportExpression><![CDATA["dash2/dash-kpi.jasper"]]></subreportExpression>
Any ideas how to fix?
It works fine in report studio.
Edit: tried removing the "dash2/" from in front of the resource name. didn't help.
Edit2: tried chaing all occurunces of dash2/xxx.jasper to repo:xxx.jrxml. This breaks jasper studio in that:
the reports no longer work in studio
when you upload the main report, it no longer recognises the dependent sub reports and doesn't upload them.
I tried manually deploying all reports, but there is no way to link a main report with an existing sub report in jasper server. The only option they offer is to edit the main report, and manually upload the jrxml files as resources. I tried this, but didn't help, still cant find them:
Repository file resource /reports/dashboard_files/dash_kpi.jrmxl could not be loaded
Interestingly, its using a dir called dashboard_files which doesnt exist. There is no reference to this dir in any of the reports jrxml files.
After much pain, I found a solution. It seems that jasper studio is not really good with nested sub reports. Here is a solution at a high level, which applies to server 5.6 and Studio 5.6 at least:
Start off with the reports with sub reports defined as "xxx.jasper" in studio.
Deploy the main report to jasper server. It will ask you if you want to deploy the sub reports (but not their sub reports). However, it does not do it right, and we have to fix it.
Now connect to the server from studio (aka repository explorer)
Your report will be under SErvers->your server->Reports->reportname->Main.jrxml. Right click on it and select properties. Select Resource Editor Tab.
copy the Parent Folder path. e.g. /reports/myreport_files
Now go back to studio. Edit every place in all your reports and sub reports where you have "xxx.jasper" and replace them with "repo:/reports/myreport_files/xxx.jrxml"
save everything
Deploy the main report again.
in Jasper Server, find the report, right click on it and select EDIT
Click on "Controls and Resources".
Delete all the resources
Now Add back each sub report by uploading by hand each jrxml file. Make sure you give it the same name and ID ans the file, e.g. my_sub_report.jrxml
pray it works.
NOTE 1: if you have any "-" in your subreport names, they will be converted to "", and it wont find them. rename all your subreports with "-" to use "" insead, remove and re-deploy.
NOTE 2: Now your reports wont work in studio. Nice one Jasper. You can try using parameters, e.g:
$P{IsOnServer} ? "repo:/reports/myreport_files/my_sub.jrxml" : "my_su.jasper"
And create the parameters defaulting to true, but I could not get this to work.
Main credit to these guys:
http://notsomany.wordpress.com/2011/11/07/subreports-within-ireport-jasper-reports-server/
Linking subreports in iReport so they also work in Jasper server
I have overcame this problem by simply NOT using the onServer parameter.
Should you put just the file name, the Studio can grab this file and deploy it automatically.
Strangely enough, this works on the server as well.

Crystal Reports Server folder backup

In SAP Crystal Server Java BI Launch Pad inside Documents > Folders > Public Folders I've created a new folder and imported (many many) reports to it.
Don't know what happened to the server but all of it's settings have been reset, and the folder is no longer there - so I need to recreate it, and import all my reports back (a proccess that takes a long time since I need to import one report at a time).
Is there a way to backup/export that folder as a backup? so next time a thing like this happens I can just restore my folder with all the reports from that backup file?
Thanks
You can use Promotion Management (aka LifeCycle Management or LCM as it was known in previous iterations) to export any set of objects (documents, universes, …). You can access this (web) application via the CMC.
Instead of live-to-live promotion (i.e. from one live system to another live system), you'd choose for a live-to-BIAR promotion, where the selected content would be exported to an .lcmbiar file. An .lcmbiar file is basically a ZIP archive which consists of the actual objects (e.g. reports, …) as you would find them on the FRS share as well as metadata information.
To restore an .lcmbiar file, you'd upload it back to the server through Promotion Management.
Alternatively, you could use the CLI to generate the file, without having to go through the web interface. This is especially useful if your promotion job consists of a very large (100+) number of objects or the selection criteria are quite specific.
You can find more information on Promotion Management in Business Intelligence Platform Administrator Guide, chapter 15.

Crystal Report Viewer 2010

I'm using Crystal report 2010 with VS 2010, and i have 2 web projects, the first is the one that my organization works with and the second is a dummy one - this is for test only -, my problem is when dealing with charts or pictures, every thing OK in the second project, but in the first one charts and pictures are displayed very will in crystal report designer, and preview, but nothing is displayed at run time. the environment of the 2 projects are identical (the same referenced DLLs, and from the same location "Local Folder", the same binding method "Objects", the same registered and add "Keys, and Assemblies" in the web.config).
kindly, note that one of the differences between the 2 projects is that the working one was created after installing Crystal Reports 2010 for VS, and the primary one was created before the installation.
please, does any body has an idea where is the mistaken part, or where I'm i suppose to search about the malfunctioning configuration, or ...... etc.
I'm sorry to bother you all the previous period,
we discovered the issue source, it is an htppModule related to our security module, we do not know what is cause of this conflict tell now, but at least we knew the source, every thing is OK, if the registration of this httpModule removed from the web.config.
Sorry again, and most thanks.

Identifying files for a hot fix/patch

We (occasionally!) have to issue hot fixes for our product and do this by reissuing the affected files directly rather than with a new installer. The product has a large number of pieces, some managed code, some unmanaged.
Currently development flags which build artifacts (exes, dlls) need to be shipped in a hot fix. We'd like to be able to identify these automatically by comparing them to the previous build. A simple binary diff doesn't work since the version numbers on all the files have changed as stamping the files with a new number if part of the build.
Are there any tools that will do a more intelligent comparison and decide which files should be included? We'd still have a developer check the list, this is more to catch files the developer didn't think of than the other way around.
(Note: changing the hot fix/build process is not an immediate option, whether or not we should be shipping individual files is a different discussion!)
These are the options I see:
On your build machine get a report of the files that were changed and use the directory structure of the file path to determine which dlls were really updated. Not sure if this breaks your "no build process changes" rule or not.
If you want to wait until after the build I would recommend using a binary file diff tool like http://www.romeotango.com/Downloads/FileCompReadMe.txt. Using that you can get back a set of diffs so you just need to get your script that uses the tool to ignore the diff that occurs as a result of the version number. You can figure out the pattern to how the version number appears by using a controlled scenario where you know the two binary files are the same except for the version number and note where the differences are. Do that for a few of your dlls and hopefully a pattern emerges enough so that you can script it.