Reference file for formatted views

Methods, program products, and systems for displaying data in formatted views using reference files are described. In some implementations, a database application program can generate a result set using one or more queries. The result set can contain actual data from a database and metadata. The metadata can contain references to data records in the database, the references can include identifiers that can identify the data records. When a user saves a database report file, the user can save at least a part of the result set using the identifiers instead of the queries and layouts. Thus, the result set can be saved as a reference file. When the database application program opens the saved reference file, the database application program can reproduce the result set using the stored references without running all of the queries.

TECHNICAL FIELD

This disclosure relates generally to database applications.

BACKGROUND

Many modern database application programs include a query engine with a formatting tool. A user can use the query engine to build queries to retrieve data from the database, and use the formatting tool to display the data in a report in various formats. The queries and formatting information can be saved in the database application program. To reproduce the report, a conventional database application program reruns the query to retrieve data, reformats the retrieved data, and redisplays the result. The query can be complex and the data in the database may have been changed (e.g., a new record can be inserted into the database).

SUMMARY

Methods, program products, and systems for displaying data in formatted views using reference files are described. In some implementations, a database application program can generate a result set using one or more queries. The result set can contain actual data from a database and metadata. The metadata can contain references to data records in the database, the references can include identifiers that can identify the data records. When a user saves a database report file, the user can save at least a part of the result set using the identifiers instead of the queries and layouts. Thus, the result set can be saved as a reference file. When the database application program opens the saved reference file, the database application program can reproduce the result set using the stored references without running all of the queries.

Saving a result set as a reference file can achieve the following advantages. A reference file can capture records in the result set that are not results of a direct query (e.g., records manually added to the result set). The reference file can increase the likelihood that a formatted view reproduced later using the reference file contains the same records as the current formatted view. Reproducing a formatted view using a reference file rather than a query set can be more efficient when the database is large or when the query set contains complex queries that take a long time to execute. The reference file can contain references rather than actual code for queries, therefore can be compact and easily transportable (e.g., through email). A recipient of the reference file can reproduce the formatted view using a lightweight database application (e.g., an application that includes a light-weight database engine), without having to run complex queries.

The details of one or more implementations of using reference files for formatted views are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of reference files will become apparent from the description, the drawings, and the claims.

DETAILED DESCRIPTION

Reference File Techniques Overview

FIGS. 1A and 1Billustrate a comparison between a conventional database application program and a database application program using reference file techniques. For convenience, the exemplary implementations will be described with respect to a database reporting system that runs the application program, and a user using a database application program. Generally, the database reporting system can permit the user to view formatted data through an application program instead of directly accessing raw data stored in a database. A database application program can include various components, such as a query engine (for retrieving data from the database), a layout editor (for creating and editing layout for formatting data), and a formatting engine (for formatting and displaying the data using the layout). A user who is a database application developer can create a database application program, which can be run as a database application by the database reporting system, in a way similar to an operating system running an executable. An end user can create reports for viewing and printing using the database reporting system.

FIG. 1Aillustrates a conventional database application program. A user creates database application program120afor database102. Database application program120arunning on the database reporting system. Database application program120acan contain one or more query sets122afor querying database102, and layout124for formatting data retrieved from database102. Query set122acan retrieve records from database table104through database connection126a. In response to query set122a, data records (e.g., data records108,112, and114) that satisfy certain criteria can be retrieved. The result of query set122can be stored in result set130a, which can contain retrieved database records108,112, and114from database102. Although query set122acan be persistent, result set130acan be transient. For example, result set130acan exist in memory as long as a display window of the database application tool is open. The database reporting system can use layout124ato format result set130ato create formatted view140a, which can include, for example, header142a, body144athat includes formatted database records108,112, and114, and footer146a.

The user can save database application program120aas a separate database application program120b(e.g., for sending to another user). Database application program120bcan include query set122band layout124b, which can be identical to query set122aand124a. The database reporting system can execute database report120bagainst database102. At runtime, the database reporting system can open a new database connection126b. The query set can retrieve records and store the retrieved records in result set130b.

There is no guarantee that result set130bcontains the same records (e.g., database records108,112, and114) as result set130a. Because result set130acan be transient, the content in result130ais not saved. Between the executions of database application programs120aand120b, new records can be inserted into database table104. Some fields of existing records in database table104can change (e.g., a sales number may be revised to go up). As a result, database records106and110, which did not satisfy selection criteria defined in query set122awhen database application program120awas executed, can satisfy selection criteria defined in query set122bwhen database application program120bwas executed. Therefore, result set130bcan contain data records106,108,110,112, and114. The database reporting system can use layout120bto format result set130b, creating formatted view140b. Formatted view140bcan have the same general look and feel of formatted view140a. For example, header142band footer146bcan be substantially identical to header142aand footer146a. However, because result set130bcontains more records than result set130a, body section144bcan be different from body section144a.

FIG. 1Billustrates database application program120cimplementing reference file techniques. Database application program120ccan contain query set122cand layout124c. Database application program120ccan also contain state information, which can track how a report is being viewed by a user. The state information, which can be saved with database application program120cor separately, can include one or more current data viewing states. Data viewing states can include indicators of viewing mode, active data record (e.g., a record being edited), current view page, etc.

Through database connection126c, one or more queries in query set122ccan access database table104and retrieve database records108,112, and114. Retrieved database records108,112, and114can be stored in result set130c. Result set130ccan be a found set. A found set can include a set of records in database table104that are made active by a find request. When all records are found, the found set can include all records in the entire table104.

Result set130ccan contain data field values134from database records108,112, and114(e.g., values of database fields). In addition, result set130ccan contain record identifications132. Record identifications132need not be explicitly retrieved by query122c, but can be included by the system as a separate and hidden data structure in result set130c. In various implementations, record identifications132can include internal record identifiers that reference database records108,112, and114. These internal record identifiers can be provided at system level, e.g., as physical address of the data records. Although, in some implementations, record identifiers can be values in a database field that uniquely identifies a record in database table104(e.g., an “ID” field), it is not necessary that the record identifiers are stored in a particular database field.

The database reporting system can format the result set130cusing layout124cto create formatted view140c. Formatted view140ccan contain header142c, body144c, and footer146c. The header142c, body144c, and footer146ccan be configured in layout124c. Layout124ccan include an arrangement of data fields, objects, pictures, and layout parts that represents ways information is organized and presented when a user browses, previews, or prints data records. Layout124ccan contain various parts. A layout part is a section of layout124cthat organizes or summarizes information. For example, a header section can be a layout part that can contain, e.g., boilerplate text for an entire report, date and time, and other information generally related to a displayed view. A body section can be a layout part that can contain individual records retrieved from a database (e.g., the retrieved data). Other layout parts can include footer, title header, title footer, leading and trailing grand summary, and leading and trailing sub-summary.

In the example shown, body144ccan be formatted according to formatting information (e.g., geometry, position, color, font, etc.) of a body section of layout124c. Body144ccan contain some or all data field values134in result set130c. In some implementations, record identification can be excluded from being rendered in body144c(e.g., only actual data, rather than metadata, are displayed). For example, data fields in layout124ccan be limited to data field values134. Thus, field values134, rather than record identification132, can be rendered in formatted view104c.

Result set130ccan be transient, and can persist for as long as a window is open (e.g., when formatted view104cis displayed). In addition, in some implementations, result set130ccan be invalidated when database connection126cis closed. However, result set130ccan be saved as reference file150. Reference file150can contain data identifiers152, which can correspond to record identifications132in the result set130c. Optionally, reference file150can contain other information. For example, reference file150can contain layout reference154, which references layout124c(which can be stored separately). Reference file150can also contain state information associated with database application program120c. In addition, reference file150can also contain state information associated with states of a report that are more current than the states stored in database application program120c. For example, when a view mode in database application program120cis a browse mode but the user is in a report mode when saving reference file150, the state saved in reference150can indicate a report mode.

Saving result set130cas reference file150can include, for example, parsing result set130cto collect record identifications132, acquiring an ID of layout124c, and examining the state information of the report. Record identifications132and the other information can be formatted using various formatting wrappers (e.g., XML tags) and saved as reference file150. Reference file150can be copied, emailed, or stored in a file system as a conventional file.

The database reporting system can open reference file150upon user request (e.g., an “open file” command from a menu). Opening reference file150can trigger various processes, including, for example retrieving data set136, which can contain data records from database102. Retrieving data set136can differ from a standard query process (e.g., for retrieving result set130c), because, in the former case, the database reporting system is not required to run queries of a query set (e.g., query set122c) to retrieve data set136. Instead, the database reporting system can retrieve individual records108,112, and114directly, using data identifiers152. The retrieval can be accomplished using a direct database accessing module that uses data identifiers152to retrieve data. Another process triggered by opening reference file150can include establishing database connection156to connect to database102. If a database connection already exists, the database reporting system can utilize the existing database connection rather than creating database connection156. Because data identifiers152can identify individual database records (e.g., database records108,112, and114), other database records106and110can be excluded from data set136, even if database records106and110are added or modified such that they satisfy selection criteria in a query.

The database reporting system can apply layout124c, as referenced by layout reference154, to retrieved data set136to create formatted view140d. Formatted view140dcan contain header142d, body144d, and footer146d, each specified by layout124c. Body144dcan include data from database records108,114, and114, similar to body144cin formatted view140c.

Creating and Using Reference Files

FIG. 2illustrates exemplary implementations of reference file techniques for multi-field result sets. Multi-field result sets can include data from multiple data fields from multiple tables. A reference file can contain references to the data fields as well as the tables. For convenience, the exemplary implementations will be described with respect to a database reporting system that performs the techniques, and a user using a database application program.

A database application program can include layout210(including header part212, body part214, and footer part216). The database reporting system can also include database interface component220, which can include query set222. Query set222can retrieve data from both tables204and206in database202. In some implementations (e.g., when database202is a structured query language (SQL) database), retrieving data from both tables202and204can be achieved using a select statement with a join clause.

By executing a query containing a join clause in query set222, database interface component220can retrieve result set224. Result set224can contain records including multiple data fields. The multiple data fields can come from records of both tables204and206, as well as record identifications that correspond to internal identifiers of the records. The database records in tables204and206can each have an internal identifier (internal ID, e.g.,1,2,3,4,5,21,22,24,24,25,26, and27). In some implementations, the internal ID can be the primary keys of tables204and206. In some implementations, the internal ID can be an automatically generated address of each database record that is unique to the record and is not exposed to users. In some implementations, internal IDs can be a mixture of automatically generated addresses and primary keys (e.g., of external or foreign database tables).

In some implementations, an internal ID of a data record can include a table identifier and a record identifier. The table identifier can be used to identify in which table (e.g., table204or206) the data record is located, as well as an address within the table (e.g., a row id of the data record, and a column ID of the field within the row). For example, the internal ID can have a form “204:2:3” which specifies that the data record is located at table204, second row. In addition, the data field is at the third data column of that data record.

In this example, result set224can contain three data records. Each data record can contain one or more data fields and contain data about a single activity, individual, subject or transaction. A data record can be formed by a combination of data fields in both database table204and database table206(e.g., data field employee name from database table204and data field project name in database table206, linked (e.g., joined) by an assigned project ID). In addition to values of various data fields in the records, result set224can also contain one or more record identifications for each record. For example, record identifiers2-22for a first record can indicate that the first record is formed by data from data record having internal ID “2” from database table204and from data record having internal ID “22” from database table206.

The database reporting system can generate formatted view230, which can include header232and footer236corresponding to header212and footer216in layout210. A user can select to save result set224as reference file240. Data in various database tables can be treated differently during the saving process, depending whether the table is a base table of a layout. For example, layout210can have base table204and related table206. Base table204can be a default table for layout224. A base table can be any table in a database. Related table206can be any database table that is related to base table204by one or more data columns. In some implementations, internal IDs of base table204are saved in reference file240.

Optionally, reference file240can contain the following items, as well as other information that can be used to construct a second formatted view266:Links to one or more originating databases (e.g., database202from which the data records are retrieved). A link can be a database connection ID, a database connection object, or a database locator containing a path to or file name of the database;References to layout210(e.g., a layout ID for uniquely identifying a layout stored on a storage system or a layout file name, if the layout is stored as a separate file);A current mode (e.g., whether formatted view232is being viewed in a browse mode or in a preview mode). A browse mode can be a view mode in which a user can enter and edit information in data fields. A preview mode can be a view mode in which a user can see how layouts will look when they are printed;A current view type (e.g., whether formatted view232, in a browse mode, is being viewed in a form view, a list view, or a table view). In a form view, a user can view one record at a time. In a list view, a user can view records in a list. In a table view, a user can view records arranged in a spreadsheet-like table;A current record ID (e.g., for identifying a particular data record that is active); andOne or more current sort specifications (e.g., for specifying on which particular field the data records are sorted).

Reference file240can have various formats, e.g., binary format or text format. In some implementations, a text-based format (e.g., Extensible Markup Language (XML) format) can be used. Using a text-based format (e.g. XML) can be advantageous under certain conditions, e.g., when reference file240is attached to an email, because an email program is not required to Base-64 encode a text-based reference file240.

The database reporting system can open the saved reference file240automatically (e.g., triggered by receiving an email containing reference file240on a server) or upon a user request. The database reporting system can include direct database access module252, which can retrieve database records using internal identifiers and without running a database query. For example, direct database access module252can submit internal identifiers2,4, and5in a request254to database202. Database202can use internal identifiers2,4, and5to locate specific data records in database tables204and206, and return values of the located data records in response256. The located data records can be sent to a formatter to generate formatted view266. The formatter can be a component of the database reporting system that formats data using one or more layouts.

In some implementations where internal IDs of base table204are saved in reference file240, data from related table206can be retrieved by performing the join operation again, because internal IDs22,24, and26are not saved. However, the join operation can be limited to the set of base table IDs in reference file240.

An example including an Employee table (e.g., base table204) and a Project table (e.g., related table206) can be used to illustrate how data from related table206can be retrieved. Base table204and related table206can be related by a field (e.g., Project ID). Layout210can be designed to show a Project Name field (stored in related table206) for each employee. After reference file240is loaded, an implicit query can be performed matching the records from table204, which can be identified in the reference file, with records from related table206whose Project ID field values are equal. Although a list of employees that is shown on formatted view266can be the same list as the time reference file240was saved, the Project ID and the corresponding Project Name values can differ. This can be permissible. Although the particular snapshot of which employees were viewed at the time was restored, the expectation can be that formatted view266is displaying correct and up-to-date information.

Optionally, the formatter can locate layout210using a layout reference stored reference file240to create header262and footer264in formatted view266. In addition, the formatter can use other information contained in reference file240(e.g., current mode, view type, etc.) to display formatted view266in a way that corresponds to the mode and view type of formatted view230when reference file240was saved.

FIG. 3illustrates exemplary techniques for directly referencing database records. Database310can include database table312, which can include data columns as well as data rows314,316, and318. Data columns for database table312can include column “ID” that contains data fields for primary keys (e.g., “101,” “102,” and “103” for data records314,316, and318, respectively), column “Name” that contains data field for employee names (e.g., “Alice,” “Bob,” and “Carl”), and column “Title” that contains job title for each employee (e.g., “manager1,” “individual contributor level1,” and “individual contributor level2”). In some implementations, the primary keys in the “ID” column are distinct from the internal IDs. For example, a user can write a query statement to retrieve the primary key; however, the same user can be prohibited from accessing the internal ID of the rows of table312.

Database query302(e.g., a SQL “SELECT” statement) can be used to retrieve data in database table312. Database query302can be a typical query in query set122or222. Query302does not access data fields directly or individually. From a viewpoint of database query302, database table312can be an atomic unit of operation (e.g., query302does not divide database table312into sub-parts to retrieve individual records). If query302needs to access a subset of table312, a query that creates views or temporary tables can be utilized. However, in these situations, the view or temporary tables are the new atomic units of operation.

In some implementations, database records314,316, and318can be stored at different locations (e.g., at non-consecutive addresses320,322, and324, respectively). Each of database records314,316, and318can be located by a reference (e.g., an internal ID) that can be hidden from a user. Data fields can be retrieved from addresses320,322, and324transparently from the user. For example, during data retrieval, a process can identify the internal IDs using table schema and query logic, as well as the internal IDs. The identification process can be hidden from the user. The internal IDs can be sent together with the retrieved data fields, but in a separate and hidden data structure. For example, if the retrieved data are stored in a result object as public instance variables, the internal IDs can be stored as private or protected instance variables. UI components can be prevented from accessing the private or protected instance variables.

In some implementations, to retrieve data using reference file240, the database reporting system can use direct database access module330to access addresses320,322, or324directly, using the internal IDs. Using internal IDs to access addresses320,322, or324directly can reduce the number of steps database310has to perform to retrieve data (e.g., no query interpretation is necessary). Data retrieval using direct access can be consistent when new records are inserted into database table312. For example, if new records are inserted, the direct database access module can still retrieve the original three records. If a value of a data field is updated (e.g., when job title for Carl is changed from “IC2” to “MG1”), direct database access module330can retrieve data reflecting the change because the update can occur at address324. If a database record (e.g., data record316) is deleted, data at address322can be removed. Direct database access module330can use various techniques (e.g., default action, exception handling, or other mechanisms) to handle the situation.

Exemplary Reference File Creation, Transmission, and Receipt

FIG. 4is a flowchart illustrating an exemplary process400for creating, transmitting, and opening of reference file techniques. For convenience, the exemplary implementations will be described with respect to a database reporting system that performs the techniques, and a user using a database application program.

The database reporting system can receive (410) a first result set (e.g.,130c). First result set130ccan include one or more data records retrieved from database102using one or more queries in query set122c. First result set130ccan include data references (e.g., record identifications132) to the data records. The data references can include internal record identifiers corresponding to the data records in database102. The record identifiers are “internal” because they can be hidden from application developers or end users.

Optionally, the database reporting system can display (420) first result set130cin a first representation (e.g., formatted view140c). Formatted view140ccan include user interface (UI) components that allow the user to invoke a “save as reference file” feature. The “save as reference file” can be accessible from a menu item on a file menu, or from an icon. The file menu and the icon can be implemented using a menu bar on formatted view140c.

Invoking the “save as reference file” feature can include opening a dialog box for the feature. The dialog box can allow the user to specify a file name for reference file150. Reference file150can have a default name, e.g., a name of database application program, a name of an active database window, a name of a database, etc.

The dialog box can also include a component that can permit a user to configure the database reporting system such that reference file150is attached to an automatically generated email. The component, when activated, can cause the database reporting system to launch a default email client after saving reference file150and create a new message. Reference file150can be attached to the message. If no default email client exists or if problems occur launching the default email client, the database reporting system can either take no action or invoke error processing functions (e.g., logging an error in a log file).

The database reporting system can store (430) reference file150on a storage device. In some implementations, the database reporting system can store (440) layout reference154as a part of reference file150. Layout reference154can include a pointer to or an identifier of a layout (e.g., layout124c) that is currently being used to format result set130c. In some implementations, the user can specify a layout to which layout reference154refer. For example, the user can be given an option of using the current layout124cor another layout.

Upon opening reference file150, the database reporting system can create (450) a second result set (e.g., result set130b) using the stored reference file150. Creating result set130bcan include directly retrieving data records from database102using the internal record identifiers in the reference file150.

Optionally, the database reporting system can format (460) the second result set (e.g., result set130b). Formatting result set130bcan include retrieving layout reference154from reference file150, retrieving layout124cto which layout reference154refers, and creating a formatted view (e.g., formatted view140d) using the retrieved layout. Result set130bcan be displayed in the formatted view240d.

FIG. 5is a flowchart illustrating an exemplary process500for creating a formatted view using a reference file. For convenience, the exemplary implementations will be described with respect to a database reporting system that performs the techniques, and a user using a database application program.

The database reporting system can open (502) reference file150. The database reporting system can accept reference file150for opening based on an extension file name that has been registered with an operating system. The behavior of opening reference file150can correspond to the behavior of executing a regular database application program for running a query or selecting a layout (e.g., opening a connection, retrieving data, and formatting the data). In some implementations, if the user has insufficient privileges to view the layout referenced in reference file150or insufficient privileges to access the database in reference file150), the database reporting system can display a “no access” prompt.

The database reporting system can determine (504) if a source (e.g., database102) referenced in reference file150is already open. Reference file150can include a data source reference that identifies database102from which result set130cwas retrieved. A data source can be a named reference that provides access to a database file or an Open Database Connectivity (ODBC) data source (e.g., an external SQL database). A database file can include a collection of information in a file containing one or more tables pertaining to a subject, such as customers or invoices. A database can include one or more database files.

The database reporting system can examine a connection pool and determine if an open connection to database102(e.g., an opened database file or an ODBC connection) exists. If a connection does not exist already, the database reporting system can attempt to open (506) the connection automatically. The database reporting system can first attempt to open the connection using a remote path. The remote path can identify a database on a remote server (e.g., a server identifiable using an IP address). If the attempt to open the connection using the remote path fails, the database reporting system can attempt to open the connection using a local path. The local path can identify a database on a local server, for example, by identifying a database file stored locally. If database102(e.g., a remote database identified in a database path or a local database in the form of one or more database files, identified in a file path) is unavailable because the user lacks privilege, the database reporting tool can provide a standard error message indicating that the database cannot be opened or cannot be found.

If a connection (e.g., connection156) to database102is already open, the database reporting system can create a new database window upon the opening of reference file150. The window can be used to display formatted view140d. Displaying formatted view140dcan include restoring states (e.g., view mode) of formatted view140dto prior states of formatted view140cwhen reference file150was saved. The window can include a window name, which can be based on a name of reference file150.

The database reporting system can determine (508) whether referenced layout (e.g., layout124a) still exists. If referenced layout124ais no longer in existence, the database reporting system can select (510) a backup layout. The backup layout can be a layout that is associated with a relevant database table (e.g., database table104from which result set130awas retrieved). If no such layout exists, or if the relevant database table104has been deleted, the database reporting system can invoke an error processing process, which can provide an error message in a UI, informing the user that records cannot be displayed because either the table no longer exists or no layout based on the table exists in referenced database102.

The database reporting system can display (516) records identified in reference file150. The states (e.g., viewing modes) stored in reference file150can be restored.

After the creation of reference file150, data records in database102can change (e.g., they can be modified by various database queries). If a data record identified in reference file150is deleted after reference file150was created, the database reporting system can display a warning, informing the user that some or all of the records in reference file150are no longer available in the referenced database, and that only the remaining available records will be shown. If the current record (e.g., an active record) is one of the deleted records, the first available record in result set130bcan be made active.

Exemplary Reference File

The following list illustrates content of an exemplary reference file (e.g., reference file150).

LIST 1. Exemplary Reference File

The exemplary reference file shown in LIST 1 can be a file in XML format. In some implementations, a schema of the reference file (e.g., a document type definition, DTD, which can include a formal description of a particular type of XML) can be omitted, when the reference file is limited to private use (e.g., used by a specific database reporting system).

The reference file can contain an XML declaration element stating the XML version of the reference file, and a root element (e.g., enclosed by the <RFTAG> and </RFTAG> tags). The root tag can include a UIState element for defining a state of a formatted view (e.g., formatted view140d).

An element “Universal Path List” can be used to reference a database (e.g., database102) from which result set130ais retrieved. The universal path list element can contain references to one or more remote databases, which can be specified using a uniform resource locator (URL, e.g., “dbnet://192.168.1.197/sample database”) and one or more local databases, which can be specified using a file path (e.g., “filemac:sample.fp7). A remote database can be hosted on a local machine and accessed through local port (e.g., “localhost://127.0.0.1/sample database”).

A “Rows” element can be used to specify the data records to be retrieved. The “Rows” element can include a “type” element, which specifies what type of record identifications (e.g., record identifications132) are contained in the reference file. For example, a type of rows can be “nativeIDList,” which can indicate that the record identifications are internal record identifiers. Type of rows can alternatively include primary keys of a database table, and identifier field of a database table, etc. The “Rows” element can further include a baseTableId attribute, identifying an internal identifier of a table. The “Rows” element can also contain a rowCount attribute, which can indicate the length of the data (e.g., a number of the data records referenced). The rowCount can be used for error checking and for other purposed. The “Rows” element can include character data (CDATA) that includes the record identifications.

The reference file can include various other elements that specify display options. For example, a “Layout” element can be used to reference a layout (e.g., layout124c) based on which an original formatted view (e.g., formatted view140c) is displayed. The “Layout” element can include an attribute “id” which identifies the layout, which can be stored as a file or as a database item. A “View” element and a “type” attribute can be used to specify a view type (e.g., “form,” “list,” or “table”). A “SelectedRow” element and an “id” attribute can be used to specify which row is a “current” row (e.g., an active row). A “StatusToolbar” element and a “visible” attribute can be used to specify what a status toolbar is visible in a formatted view (e.g., formatted view140d). A “Mode” element and a “value” attribute can be used to specify whether the formatted view is in a browse mode or preview mode.

The reference file can also include a “SortList” element that can specify whether the formatted view contains a sort specification. The “SortList” element can include a “Sort” sub-element, which can specify whether data records should be sorted in ascending or descending order. A “PrimaryField” element can be used to specify one or more fields for sorting.

The reference file in LIST 1 is shown in XML format. In various implementations, a reference file can be saved using other formats, including binary format.

Example System Architecture

FIG. 6is a block diagram of an exemplary system architecture600for implementing the features and operations described in reference toFIGS. 1-5. Other architectures are possible, including architectures with more or fewer components. In some implementations, architecture600includes one or more processors602(e.g., dual-core Intel® Xeon® Processors), one or more output devices604(e.g., LCD), one or more network interfaces606, one or more input devices608(e.g., mouse, keyboard, touch-sensitive display) and one or more computer-readable mediums612(e.g., RAM, ROM, SDRAM, hard disk, optical disk, flash memory, etc.). These components can exchange communications and data over one or more communication channels610(e.g., buses), which can utilize various hardware and software for facilitating the transfer of data and control signals between components.

The term “computer-readable medium” refers to any medium that participates in providing instructions to processor602for execution, including without limitation, non-volatile media (e.g., optical or magnetic disks), volatile media (e.g., memory) and transmission media. Transmission media includes, without limitation, coaxial cables, copper wire and fiber optics.

Computer-readable medium612can further include operating system614(e.g., Mac OS® server, Windows® NT server), network communication module616, database interface620, formatter630, direct database access module640, graphical user interface650, and reference files660, as described in reference toFIGS. 1-5. Operating system614can be multi-user, multiprocessing, multitasking, multithreading, real time, etc. Operating system614performs basic tasks, including but not limited to: recognizing input from and providing output to devices606,608; keeping track and managing files and directories on computer-readable mediums612(e.g., memory or a storage device); controlling peripheral devices; and managing traffic on the one or more communication channels610. Network communications module616includes various components for establishing and maintaining network connections (e.g., software for implementing communication protocols, such as TCP/IP, HTTP, etc.). Direct database access module640can include one or more functional components for retrieving a data record from a database using an internal identifier. Reference files660can include data values, data record identifications, references to layouts, display modes, and other data and formatting information.

Architecture600can be included in any device capable of hosting a database application program. Architecture600can be implemented in a parallel processing or peer-to-peer infrastructure or on a single device with one or more processors. Software can include multiple software components or can be a single body of code.

A number of implementations of the invention have been described. Nevertheless, it will be understood that various modifications can be made without departing from the spirit and scope of the invention. Accordingly, other implementations are within the scope of the following claims.

For example, the term “database” can refer to any structured collection of data that is stored on a computer system, including, for example, a relational database, an object-oriented database, a file system, an indexed collection of documents, or any structured data. The term “query” can refer to any request for information retrieval, including, for example, a SQL query, a search request, or a request into a file system. The term “database reporting system” can refer to any system that accepts queries, identifies information using the queries, and presents the identified information to a user in a formatted view. A database reporting system can include, for example, a Relational Database Management System (RDBMS), a desktop file indexing system, or an Internet search engine. The term “reference file” is not limited to a stand-alone file, but can include, for example, a set of two or more files, a body of an electronic mail message, or a data structure stored on a disk, on a flash drive, or in memory of a computer system.