Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Can anyone help me with integrating a JasperReport (From iREPORT) into OSRMT?
I have the report working correctly in iREPORT, but cannot get it to work from within OSRMT.
Any help would be appreciated.
Thanks in advance,
Hmm. In the OSRMT user Manual, on page 16, begins a blow-by-blow description of how to install your custom report into OSRMT's reports system. The method they want you to use, however, is to COPY an existing report to a new name, and then to modify it with iReport. When you use the OSRMT "Add Report" function, you will have a wizard to help you to integrate it, including entering your query..
For the installed reports, the SQL in use is XPath (select * from artifactdetail).all reports are based on this view alone, defined in <install_dir>/osrmt/client/schema/<servertype>_create_view.sql.
You may have to alter your report creation approach,
I have followed this approach, as per the manual and your advice:
1/ Made a copy of the existing "ArtifactDetail.jrxml" report in the reports directory (Called it: swArtifactDetail.jrxml).
2/ Made my formatting changes in iReport (Using V3.7.1) and tested output is correct
3/ Built new jasper file.
4/ From Tools->Reports, I Added my own report, swArtifactDetail.
5/ Copied data from the Report Outline tab of the existing report "ArtifactDetail" to my report
6/ In the "SQL Report" tab, I cannot select a "Report Parameter form" "Report Parameter - Product List", is always cleared when I check the properties of my report. File name used was: swArtifactDetail.jasper
7/ When I select my report and press "Next", their is no list of "Products" to select from.
Have you encountered this problem, can you help me?
I really want to use this product, if I could get the Reporting to work.
Thanks in advance for any help.
I hardly know where to begin. There are a lot of places for things to go wrong here, and some experimentation will be needed to see if we can produce an immediate fix.
The embedded jasper reports is version 1.3.1: Compiling with iReport 3.7.1 (I know, the interface TELLS you to get the new & improved) is bound to result in some inconsistencies. When you edit/save the report the first time, it will say something about it being in a different format - you want to keep existing format. Let's assume for the moment, that the compiled dot-jasper file actually runs and does not need a newer jar file. (I say this because you did not post a huge java error trace.)
You definitely need to create a parameter input dialog. I have used Parameter Inputs (I believe the official term is "Query Input Controls) with iReport itself and with Jasper Server, but have not gone through the drill of trying to generate one for an embedded system. Need to reference a Guide here, to see if the developer is expected to roll his own, or if a mechanism exists. Why not search the forums over at jasperforge.org to see if anyone has been working similar ground?
At the same time, you can post the problem there and see what pops up. I will see if I can get any smarter on the issue & post something back here.
Yes, you are correct, compiling with 3.7.1 does not work.
Retried with 1.3.1 and yes, I get a pdf report of the first found database, the "Example" as provided in the Distribution only.
If I change the SQL query in any way, I get no data into the final pdf file.
Still do not get the selection option in the second tab where one selects the Report output file type, pdf or html
One additional thing I have found in the standard report is that the "Example" Product is the default select. If I change to my Product, no information is printed.
After a little messing around, I go the parameter field to accept my Product, the data base entry had the spaces striped from the product name.
Still, it would be really nice if I knew how to get my Report to actually select the Product I want to report on, rather than having to embed it deep in an iREPORT parameter.
Any thoughts, suggestions would be much appreciated.
Thanks in advance.
80% of distance to target.
You should be able to solve both of your remaining problems. To increase understanding, try to edit the dot-jrxml file by HAND. You may need a 3rd party editor, like Notepad++.
1) Starting at about liine 80 (mileage may vary), there is a <parameter> block to choose the product. It contains this:
Change "Example" to your no-spaces Product.
Manually delete the dot-jasper, re-open in iReport and re-compile w/o making changes.
2) Armed with this new knowledge, look at the <querystring> block (~line 82 in the original) - it has the SQL query in it, filtering on the product parameter. Remember "artifactdetail" is a view, based on a more complex query on the tables.
This is accessible from the old iReport interface under Data -> Report Query. You should not have to edit by hand, but there is a satisfaction not unlike replacing the head gasket on a saturday afternoon.
Note: I am "walking and talking" through this- for my part, I installed a new version of JasperServer and made reports there rather than integrated into the interface - that has its own learning curve, but is much more versatile over the long run.