Importable resources makes it possible to break up the responsibility of who in the organization defines the available data sources like Tables and Queries, who defines the available parameters or who defines the available Paper Stocks or even the starting label or report design(s).

 

All resources with the exception of parameters can made to be importable using a standard design pattern.

 

Tables, queries, reports, labels, requests, drivers, class paths, and paper stocks can all be made to be importable within the designer by creating standard projects and then placing these projects in the package com.peernet.reports.resources.   When a client performs the import... operation as shown below:

 

import_table_resource

 

 

The Import <Resource> dialog is displayed as demonstrated above, where in this case the Import Table dialog is shown.  

 

To allow resources to be grouped by name, the resources contained within a single project file (pnj file) are grouped on one tab.  The tab name is derived from of the project file by removing (.pnj) extension.

 

In the above example, two project files named tables.pnj and tables2.pnj were placed in the com.peernet.reports.resources package.   Each of these projects contained at least one table resource.  If the project did not contained any table resources, it would not be added as a tab in this Import Table dialog.

 

You can follow this same design pattern to create the other resource projects with importable resources, where the group name is derived from the project file name.  The only exception to this are importable parameters.

 

To create importable parameters, you need to create a project(s) in the com.peernet.reports.parameters package.   Within this project(s) the parameters associated with a label are importable.  The name of the label is used as the group name and represents a single tab in the Import Parameters dialog.  For example, the project below has one label named STREAM with four parameters as shown below:

 

 

import_parameters_project

 

 

When this project is placed in the com.peernet.reports.parameters package, and we import a parameter into a project, the following Import Parameters dialog is displayed:

 

 

import_parameter_resource