Produce-zero-paged report



  • Hi,

    Due to the complexity of my report, I am pretty much entirely building it through a series of pdf utils through the afterRender on my main template. The main template may or may not produce content depending on some variables. If I produce no content then I don't want to render a page and then I would just keep appending more sections in afterRender. Can I make a template not produce a page? Alternatively, if I can delete a page in 'res' in afterRender that would also do the job. - is this possible?



  • Hi,

    please elaborate more on your use case so we can discuss the solution.

    If the main template shouldn't produce a page/content, you can in afterRender of main just skip the res.content and instead start appending from the first template you want to append. Something wrong with this?



  • Ok thanks Jan, so if my main template is expected to produce no content, then in afterRender() I next call my next template (template2 let's call it) and after it comes back, I just set res.content to template2's content?



  • Yes, that was the idea.


Log in to reply
 

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