how to get the Location when sending parameter async=true in jsreport.render?



  • When I sent this request

    
    const result = await jsreport.render({
            template: {
                name: '/generic/generic-report',
                recipe: 'chrome-pdf'
            },
            options: {reports: { save: true, async: true }}
        })
    

    I do not get Location or a report id (to manually generate location), only result.content has the string "Async rendering in progress."
    Any ideas?

    • How to get the Location or the generated id?
    • Send as parameter an id generated by me? How would you send it?

    Thank you so much!!!



  • You need to do the following

    const result = await jsreport.render({
            template: {
                name: '/generic/generic-report',
                recipe: 'chrome-pdf'
            },
            options: {reports: { save: true, async: true }},
            context: {  http: {  baseUrl: 'http://localhost:5488'   }  }
    })
    


  • It worked! Thanks!

    Pablo


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.