Link to home
Start Free TrialLog in
Avatar of Shaji
Shaji

asked on

Best way to represent reports (PDF) in browser front end using JSON from a REST based application

We are developing a Java REST based application and we have to convert reports in the following format (PDF, Excel, CSV, XML and HTML) and also there is a requirement to schedule reports at a predetermined intervals.

The data exchange format is JSON, what would be the best way for the user to download reports (for example PDF reports)

1) Do we need to send the PDF content as a JSON response
2) or do we need to send the title of the report and the URL link as the JSON response. In this case the URL link will represent the PDF file on the server side and by clicking the link, the user can download the report from the server
3) or do we need to send the data (row, column etc) as JSON response and then construct the PDF at the client side (browser front end) using any JavaScript libraries?

Or is there any alternate ways (best practices) for the user to download PDF reports in the modern browser (We assume only the latest version of major browsers will be used by our users ex. Firefox, Chrome, IE, Edge, Safari and Opera

Any pointers or links to some useful examples would be of immense help.

Thank you
Avatar of Mike McCracken
Mike McCracken

Are you looking for a new reporting tool or just a way/method of sharing information?

Unless you have control over the user's machines don't bet on them having the latest version of a browser.  I work as a consultant and many of our clients are still on older versions of IE including IE8 and 9.

mlmcc
Avatar of Shaji

ASKER

mlmcc,

We are targeting for corporate environment and we expect users to use at least Chrome or Firefox.

The front end is built using only  HTML5, CSS 3, JavaScript, jQuery and Bootstrap.
SO no reporting tool like Crystal Reports or SSRS is involved.
Is that correct?

mlmcc
Avatar of Shaji

ASKER

mlmcc,

We are not using any reporting tools like Crystal Reports or SSRS
ASKER CERTIFIED SOLUTION
Avatar of Ido Millet
Ido Millet
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shaji

ASKER

Thanks a bunch IdoMillet