4.2.3 Example: Archiving a Report
The following example demonstrates how to save a report to the archive:
//Save in archive
//Define permission structure
PermissionStruct ps = new PermissionStruct();
List readUserList = ps.getReadUsers();
readUserList.add("admin");
//Define archive rule
ArchiveRuleStruct ar = new ArchiveRuleStruct();
ar.setType(ArchiveRuleType.AGE);
ar.setDay(3);
//Save the report in the archive
repository.saveInArchive(ticket, repletID, "archived customer list", FormatType.PDF, ps, ar, "comments");
| << 4.2.2 Example: Emailing a Report | © 1996-2013 InetSoft Technology Corporation (v11.5) | 4.2.4 Example: Scheduling a Server Task >> |