Search code examples
jasperserver

How Jasperreports Server stores report output internally?


There are few ways to store report output in JR Server: FS, FTP and Repository. The repository output is the default one. I guess the files in the repository must be stored in the DB or file system. Are the files kept forever? How can I manage the repository and for example set a file's lifetime?


Solution

  • As of JasperReports Server v 6.3.0 the reference to all resources is kept in jiresource table, while content of is kept in jiresource.

    In my case I was able to retrieve all output reports with:

    select r.id,r.name,r.creation_date 
    from jiresource r, jicontentresource c 
    where r.id = c.id;
    

    The definition of jicontentresource is

    jasperserver=# \d+ jicontentresource
     id        | bigint                | not null  | plain    |              |
     data      | bytea                 |           | extended |              |
     file_type | character varying(20) |           | extended |              |