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
RESTWeb BrowsersDB Reporting ToolsCrystal ReportsJSON

Avatar of undefined
Last Comment
Shaji

8/22/2022 - Mon
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
ASKER
Shaji

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

SO no reporting tool like Crystal Reports or SSRS is involved.
Is that correct?

mlmcc
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER
Shaji

mlmcc,

We are not using any reporting tools like Crystal Reports or SSRS
ASKER CERTIFIED SOLUTION
Ido Millet

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Shaji

Thanks a bunch IdoMillet