Jump to content
We've recently updated our Privacy Statement, available here ×

WHERE TO PUT .JASPER FILE?


d.wendler
Go to solution Solved by Yuri Savochenko,

Recommended Posts

  • Replies 12
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

Are you using ireport tool to develop the reports ? If yes select the local repository from the ireport(which needs some configuration.you need to add new repository and give user name and password , Jasper reports server url).After successfull then open that repository from ireport and access the repot files.There you can place your file.

 

Link to comment
Share on other sites

no, Im not using ireports or any gui. I prefere the webservice to upload files but it only accepts jrxml, not .jasper files. I use ant to compile report files via command line / shell. The files are not stored physically, they must be in the database. how to fetch and put files into? via shell or webservice only, no gui
Link to comment
Share on other sites

I cannot run jrxml files as reports. They have to be compiled first.

MMy solution now is to compile the jrxml via ANT to .jasper files,

and here the solution for deploying:

In the postgresql database there are 3 tables for Folders (`jiresourcefolder`), Resources (`jiresource`), ReportUnits (`jireportunit`) and the contents (blob) of those in `jifileresource`.

To import a ressource / file / folder into JasperServer, just INSERT into the database :-))))))

 

Link to comment
Share on other sites

What version of JRS are you using and what webservices?

Via "REST 2" webservices we can upload jrxml files and run those reports via webservices, for that purpose you will not use GUI, you just need started JRS. The responce for REST 2 request you can get different formats (like html, doc, pdf...). For previous versions you can ue SOAP requests to get html export of your jrxml report

Link to comment
Share on other sites

I use 5.1.0 Commnunity Edition.

You do not compile reports? Can you show how to do it?

 

I know the request for report execution is like:

http://:/jasperserver[-pro]/

rest_v2/reports

/path/to/report

.

?

where is one of the following:

html, pdf, xls, rtf, csv, xml, jrprint

 

But whats the request for upload + (pre)compile?

Thx!

Link to comment
Share on other sites

thanks.

I can't find anything about uploading jrxml files and let them auto compile by the webservice or jasper. are you sure, you upload a jrxml file, without hitting it on ireports or anything, and just run it? What webservice call to use to upload+compile ?

Link to comment
Share on other sites

  • Solution

Your flow can be:

1. create via REST2 new jrxml file in JRS repository. to do that use 2.2.4 PUT request, but inside String resource-descriptor just put your jrxml data

2. create new datasource (if needed)

3. create new jasperreport that uses your previously uploaded jrxml. check especially 2.2.1, there you can find sample resource descriptor for jasperreport or datasource, which you can take as the reference for creating new reports via webservices (2.2.4) (just put your properties/datasource repo path/jrxml repo path/) 

4. after jasperreport was created, then you can run it as said in 3.1.1 (JRS will automatically compile jasperreport)

Also if you consistently run few reports, maybe it would be easier to define them in JRS using WebGUI or uploading the report from iReport into JRS repositor, otherwise you will have to use REST services to create jrxml/create datasource/create report/run report

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...