jsreport Configuration: Ensure that you have properly configured the jsreport.serverUrl variable with the correct URL of your jsreport server. The URL should point to the jsreport server API endpoint.
Authentication: You mentioned the need for authentication to access the report. If your jsreport server requires authentication, you should handle authentication either through the server itself (using authentication plugins or middleware) or by sending authentication credentials (e.g., API keys or tokens) along with your API request. Make sure your server is set up to authenticate requests properly.
Template Name: The code specifies a template name 'TimeSheet'. You should make sure that a template with this name exists in your jsreport server. Templates in jsreport are used to define the structure and layout of the generated reports. Ensure that the template name is correct and that it matches an existing template on your jsreport server.
jsreport.render: The jsreport.render function is used to render the report. Ensure that the generateReport function is being called when you click the "Get PDF Report" button. You can add console.log statements or use browser developer tools to check if the function is being triggered and if any errors are being logged in the console.
HTML Structure: Ensure that the HTML structure is valid. The generateReport function seems to be using $("#placeholder") to target a <div> element with the id "placeholder" to render the report. Make sure this <div> element exists on your page.
Cross-Origin Requests: If your jsreport server is hosted on a different domain or subdomain, you might encounter cross-origin issues. Make sure that your server allows cross-origin requests from the subdomain where this code is hosted. You may need to configure CORS (Cross-Origin Resource Sharing) settings on your jsreport server.
Network Requests: Use your browser's network tab in the developer tools to inspect the network requests being made when you click the button. Check if the API request to the jsreport server is being sent and if there are any error responses.
So imagine a dataset that generates a template with 20 to 30 full content in letter-size pages including some infographics
it is hard to tell you how to optimize something i don't have full visibility but it seems to me that in this case the loop is not the slowest part, but rather the pdf generation handled by chrome (assuming you are using chrome-pdf recipe), which is slow at generating a table with a lot of rows.
if you render the template in the studio with the same data that the api send, what do you see in the studio profile? that should give you some hints about what took the most part in the render.
the component should be there if you installed jsreport from npm, are you installing this way?
# file system store use for real time sync between multiple servers
# realtime logs for current requests
# used by sheduling extension to persist info about past periodic reports
# used by reports extension to persist info about async reports
I resolved the issue of exporting empty files by installing a compatible version of Node.js
However, I run into problems upgrading the app because the command line was installing Node.js in a global location. Our web app is using yet a different version of Node.js. So, I need to figure out how to install more than one version of Node.js in a single PC.
Thank you for your help.
Disabled Categories are greyed out
This topic will be moved to the category
Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.