Jump to content
Changes to the Jaspersoft community edition download ×
  • Sometimes I see duplicate queries when a scheduled report runs, why?

    • Product: JasperReports® Server

    Issue Description

    Sometimes you might notice a duplicate report query is executed when a particular schedule job is executed.  There is valid reason for this to occur in certain setups.  Datasnapshots might help these scenarios.


    When choosing output types for a scheduler job, you might choose types that are paginated as well as non-paginated.   If you choose one of each type for the same job, the result will be that the report is filled twice, requiring that the query be executed twice.

    The JasperReports API marries a compiled .jrxml with a datasource and any parameters/settings (like whether pagination or set or not) then the fill-process occurs, next this pixel-perfect filled report is finally transformed into the specific output type(s). The fill-process needs to repeat if you've selected both paginated and non-paginated output types because the layout is entirely different needing to loop thru the entire dataset two different times.

    Curious administrators need to beware that to paginate or not can be overridden in a report via IS_IGNORE_PAGINATION param and via jr properties at a report level and server-wide level, like the following which makes normally paginated CSV be not paginated:    


    To prevent this duplication effect, one option is to consider data snapshots.  A data snapshot can create something similar to a query-cache, which will prevent this phenomena, and you can setup the server to only allow data snapshots for certain reports.  But you need to be very careful regarding resource impacts and test fully.  Data snapshots are discussed here:


    Ref. Case 01455488

    User Feedback

    Recommended Comments

    There are no comments to display.

    This is now closed for further comments

  • Create New...