Bookmarks
Bookmarks provide a mechanism for storing and re-using the request parameters, user input data, and configuration choices made by users at runtime.
The following topics discuss the use of bookmarks:
- Adding Manual Bookmarks to a Report
- Adding Automatic Bookmarks
- Organizing Bookmarks
- Enable Item Counts
- Sharing Bookmarks
- Sharing Bookmark Folders
- Sharing with Groups of Users
- Creating a Bookmark Manager
- Running Most-Recent Bookmark on Page Load
- Storing Bookmark, Gallery, and SaveFiles in a Database
About Bookmarks
Depending on how they're developed, Logi reports can offer users many opportunities to customize their reports at runtime. Developers can include user input controls and "super-elements", such as the Analysis Grid, in the reports. Super-elements have their own user interface and give users a lot of freedom to work with data, arrange table columns and rows, and add charts to their reports.
However, the time users invest in configuring their reports may be lost when their session ends. Logi "bookmarks" allow these settings to be saved, on an individual user basis, so users don't have to re-configure their reports each time they view them. Bookmarks can save the following:
- Values selected in user input controls
- Session variables and link parameters
- Super-element UI configurations
When a bookmark is created, it essentially "vacuums up" all the values that will become Request parameters, all super-element UI configuration settings, and all session variables and saves them in an XML data file. The contents of the file can be "replayed" at runtime to recreate the report, with all of its selections and settings intact.
Bookmarks will not work with values passed using a Target-type element's Request Forwarding attribute. When this attribute is used, request variable values are not passed in a query string so they will not subsequently be available to be saved in a bookmark. To achieve the desired results, instead of using Request Forwarding, use a Link Parameters element to send request variable
values
to the
target
report.
Bookmark Types and Scope
Manual bookmark functionality, which uses special Action.Bookmark elements, is report-wide in scope. All of the values listed above will be saved. If a report definition includes two super-elements, the UI configuration values for both of them will be saved.
The special bookmark Action elements are available as children of Label, Button, Image, and other elements that can be used to initiate actions. These special elements are discussed in more detail in Adding Manual Bookmarks to a Report.
Automatic bookmarks provide similar functionality but their scope is limited to recording the configuration details and parameters of their parent super-elements. These details are saved automatically every time a user makes a change in the super-element user controls. This makes working with bookmarks extremely easy. The Auto Bookmark element is available as a child of several super-elements and its use is discussed in Adding Automatic Bookmarks.
You can use either manual or automatic bookmarks in a report, but not both.
Bookmark Data
Regardless of type, bookmark data is stored in one or more XML data files, called a "Bookmark Collection" and, typically, there's one collection per user. The developer specifies the storage location and ID of the collection. If Logi Security is being used, these files can be named using the @Function.UserName~ token, thus tying the bookmark collection files to an individual user.
Bookmarks can be saved in a SQL database instead of in the file system; see Storing Bookmark, Gallery, and Save Files in a Database.
Bookmarks are identified by report name and a description. Special elements, discussed later, are available so developers can create their own Logi applications to manage bookmarks.
The Bookmark Organizer element allows users organize bookmarks into folders and sub-folders, which can
be shared with other users.
Working examples of the Bookmark elements can be seen in our sample application.