Monday, October 8, 2007

eRD Pro Example of Reusable Reporting Concepts

Here is an eRD Pro example that uses all the previously discussed Reusable Reporting concepts. The data layer uses our generic schema. The presentation layer is built off the generic schema field names. Internationalization is accomplished through properties files with name/value pairs associated with the generic schema. It can be downloaded by clicking here.

This report can be run and viewed in English, Japanese and French. Set the viewing locale in eRD Pro Designer's Tools | Options | General tab then Default locale dropdown.


When running this example in the designer, choose the desired locale in the report input parameter dropdown. Since this report is running at generation time, it doesn't have the viewing locale to make this decision for us, so we handle it through the dropdown.


Now you can see how the Reusable Reporting concepts can be used with eRD Pro reports. Later on, I'll discuss how other components in the report layout can be published to a library and made available to all your reusable designs.

Tuesday, October 2, 2007

BIRT Example of Reusable Reporting Concepts

Here is a BIRT example showing the reusable reporting concepts in action. This example uses our generic schema in the data layer, presentation layer and internationalized locale property files. It can be downloaded here. This example uses BIRT's Classic Models database for the data source. It has two data sets that conform to our generic schema: Countries Data Set and ProductLines Data Set. The report only uses one at a time. The report also uses four internationalized properties files: Countries_en_US.properties, Countries_fr.properties, ProductLines_en_US.properties and ProductLines_fr.properties. They will be used in conjunction with the appropriate data set and locale setting with the BIRT Designer.

First, make sure your BIRT Designer locale setting is set to English (United States) in Window | Preferences | Report Design | Preview.


Run this report as is to see our report against the Countries Data Set with the column headers displayed in English from our Countries_en_US.properties file.

Change the locale setting to French and rerun the report. The column headers will be displayed from the values in the Countries_fr.properties file.

Now, let's take a look at swapping out the data set without having to change the presentation layer. We can do this inside the BIRT Designer by right-clicking on the Table tab in the report design layout and choosing Edit Data Binding. Choose ProductLines Data Set in the Data Set drop down. Answer "No" to the question about wanting to clear all existing data field information. We answer "No" here to keep all our field names that are set to our generic schema, thus not having to make any changes to the presentation layer. Click "OK" to save settings.

Next, let's set the associated locale properties files. Since we swapped in the ProductLines Data Set for our underlying data, we now need to have the associated column headers display on this report. Click on any part of the report design other than the table to choose the report. Look in the Property Editor under Properties and select Resources. Change the Resource File to ProductLines.
Enlarge

Run this report to see the product line data with appropriate column headers. Change the locale setting to back to English and rerun.

You can now see the powerful capabilities of using our generic schema and internationalization. This two column summary report design can be reused easily by swapping in different data sets and locale property files. Later on, I'll discuss how putting components of the report design in a library will further extend the power of these reusable reporting concepts.