Details of table and query scopes.
For connection configuration and a quick overview see the quick schema setup.
ReportWeaver allows developers and administratorss to control how a database is accessed. This provides extra security and convenience:
Not all user may acccess all tables or rows of the database.
Unexperienced users should not create database queries, because this can disrupt database operations.
The links in the tables can be specified in advance, making report design easier.
Data that comes from a view can be normalized, making the data structures more intuitive.
This is achieved by defining an intermediate layer, where the scope of each report is defined. A scope defines which data can be accessed by a report, and how it is acccessed. The scopes borrow their structure from object oriented programming, therefore they are also called classes. (Classes are the central notion of object oriented design and programming) Scopes can be linked, and they can be nested, to provide navigational access to the data, which is more intuitive, than SQL joins. Scopes can be used to present the data in 3rd-normal-form even if the underlying database is denormalized for physical storage reasons.
Scopes do not create a large overhead, and they do not add a performance penalty. In fact scopes allow for better performance, because the decouple report design from database access optimisation. This way the access pattern can be improved without changing the reports.
- The tables in your database. You can access them by creating scopes on the right.
- The defined scopes. These will be available for your reports. The
Root is the name that will be used to access them.
- The selected source table. (Used by
New Table Scope)
- The selected scope. (Applies to
- This creates a new scope for the table selected on the left.
- This creates a scope for a SQL query.
- This edits the Table scope or query that is selected on the right.
- This will remove the selected query from the schema.
Creating a new table scope
- The name of the view. This is class (or type) name of the view.
- The root is the entry point from where you can start to define a report template. If you leave the name empty, then the wiew can only be used as a subview of other views/queries.
- The primary key of this table. (Optional)
- Whether this is a table that contains only a single row. Singletons are treated specially in ReportWeaver to simplify the report design process.
- The available columns in the table.
- The fields that you have chosen. They will be available in the report design.
- This addds the selected columns on the left to your scope on the right. The columns are either added to the selected subgroup, or to the top level.
- Adds a special member, under which you can group the details of a master detail query. You will be asked for the member name and the group name.
- Adds a link to another table/query/view. This allows you to access several joint tables in a report.
- Here a branch has been created. The
Invoices view of this example contains the data from the
Order and the
OrderDetails table. The branch specifies which fields come from the order details. For a simple first report this is not needed.
Adding links to other scopes.
This is described in the chaper on scope linking.