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

Can we use Web Services to display report output?


avu

Recommended Posts

We would like to be able to schedule reports using JI; However, would like to display the output to our users to view using our own web application.

 

Could we do this using the JI Web Services API? If so please provide an example/instruction on how this could be done. I was able to write a java class to list and get the ResourceDescriptor of the pdf/html file I want to view. But, what I'm suppose to do next with the ResourceDescriptor of the report output ...???

 

Please advise. thanks.

 

Ann

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks Sherman for your quick response :)

 

I have reviewed/studied the JI documentation on Web Services and was able to write a java program to list, get and run reports; however, we would like to get a report output (i.e. html, pdf or xls) from the repository. Is this possible?

 

An example/sample code would be helpful.

 

Thanks,

 

Ann

Link to comment
Share on other sites

  • 3 months later...

I was told that you should be able to use the Web Services 1.2 API to get any object from the repository. I haven't gotten a chance to try this yet. I will need to do this soon in the next couples of weeks. I will post an example once I have one working .

 

However, in the interim I was able to run a report and have the PDF return to me as an attachment so our users can view the PDF file without having to log into Jasper Server. Eventually what we wanted to do is schedule a report and just get the PDF output for our users to view/save.

 

Hope this information is helpful.

 

Have a nice day,

 

Ann

Link to comment
Share on other sites

I think the Jasper Server interface is very nice and provides a lot of GREAT reporting/scheduling functionality.

 

Regarding developing your own webapps interface it really depends on what your users needs. The reason why we needed to develop our own code to interface with the JS repository is because we wanted reports to be integrated with our own web application. (i.e. we did want our users to have to log into another interface/application to access their reports). However, we wanted all of the reports to be stored in a central repository and wanted to take advantage of Jasper Server's scheduling capabilities.

 

Hope this response helpful :)

 

Ann

Link to comment
Share on other sites

  • 7 months later...

I think the answer to your question is pretty easy. Accessing an object from the repository does not require web services--all you need is a URL to its location in the repository. The web services API is used to manage and run JasperReports stored in the repository (e.g., listing authorized reports, running them, exporting them, uploading, deleting, etc).

 

When you schedule a job and export to PDF, you save that file in some location in the repository. Find the file in that location, get its properties (e.g., http://myserver:8080/jasperserver/ContentFiles/pdf/my.pdf), and you should be all set. (You should be able to use this technique to access anything from the repository--e.g., images and so on.)

 

Make sure you check the permissions for the file in the repository; users will be prompted to log in before they can view secured files.

 

Ann, you're taking good advantage of JasperServer! It was designed to do exactly what you're doing--run as a stand-alone server plus embeddable in existing business applications. Cool...

 

Mary

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...