Creating a connection profile
There are two ways to create a connection profile in BIRT Designer Professional. You can create a connection profile in Data Explorer, when you create a data source, or in Data Source Explorer view. You use Data Source Explorer to modify, import and export connection profiles.
Connection profiles are stored in text files called connection profile stores. Connection profile stores can contain multiple connection definitions for various ODA data sources. The default connection profile store is ServerProfiles.dat, located in the .metadata folder in your workspace.
You can also define your own connection profile store, and choose an absolute or a relative file path to store it. It is a good practice to create and use your own profile store file, instead of the default store. Using the default store requires using absolute file paths for a profile location and involves additional procedures of exporting a profile.
Using the Data Source Explorer to create a connection profile limits the connection profile location definition to an absolute file path only, while Data Explorer allows a relative and absolute file path definition. When using a relative file path, the Resource folders in the designer and iHub are used as the base folders. At design time, the BIRT Resource folder points to either the project root or an item in the workspace or a folder on the file system. This setting is available under Report Design->Resources node in the Preferences view. At runtime, the BIRT Resource folder points to the Resource folder on the iHub.
Like other BIRT resource files, you must deploy the connection profile store to the iHub when you deploy the report that uses it. By default, BIRT Designer deploys relative path connection profiles to the iHub resource folder.
The connection profile store file can be encrypted using BIRT secured encryption framework. The default extension for the connection profile is .acconnprofiles. This extension is tightly integrated with the default out-of-the-box encryption.
How to create a connection profile using Data Explorer
1 In Data Explorer, right-click Data Sources, and choose New Data Source.
2 In New Data Source, choose Create from a connection profile in the profile store, as shown in
Figure 24‑1.
Figure 24‑1 Create a new data source
3 Choose Next. Connection Profile appears, as shown in
Figure 24‑2.
Figure 24‑2 Connection Profile
4 In Connection Profile, perform one of the following steps:
To use an existing profile store, choose Browse.
1 In Browse, narrow down your selection by choosing Relative Path, or Absolute Path for the connection profile store. Relative Path lists all the connection profile stores in the Resources folder. Absolute Path opens a browser window to the file system.
Selecting a connection profile store displays the connection profile store content in the text box below Use externalized properties in Connection Profile Store.
2 Select Use externalized properties in Connection Profile Store to maintain the link to the profile instance in the external profile store file. It is enabled by default. Disabling removes the external reference link, and copies the properties from the selected profile to the data source local properties.
3 Deselect Use the default data source name, if you wish to specify a data source name different from the default.
To create a new connection profile store, choose New. Create Connection Profile Store appears, as shown in
Figure 24‑3.
Figure 24‑3 Create a connection profile store
4 In Create Connection Profile Store, select an existing profile from the list or choose New to create a new connection profile.
New Connection Profile appears, as shown in
Figure 24‑4, and lists the data source types for which you can create connection profiles.
Figure 24‑4 New Connection Profile
5 Choose a data source type and specify a name of the new connection profile. In this example, as shown in
Figure 24‑4, Flat File Data Source type is selected.
6 Choose Next. A new window for defining the data source properties appears.
7 Specify the required information to connect to the data source. For a flat file data source, as shown in
Figure 24‑5, you must enter:
flat file home folder, or file URI
flat file character set format
flat file style
file format details, such as Use first line as column name indicator, Use second line as data type indicator, and Use trailing null columns.
Figure 24‑5 Defining a folder for a flat file data source profile
The connection properties are the same as the properties displayed by the data source wizard.
8 Select Test Connection to verify the connectivity.
9 Choose Finish.
The new connection profile appears in the list of connection profiles, as shown in
Figure 24‑6.
Figure 24‑6 Selecting a connection profile
10 In Create a Connection Profile Store, select the connection profile, Products.
11 Specify a file name for the store file.
12 Choose Browse to select a location for the profile store, or choose the arrow icon next to Browse, and choose Relative Path or Absolute Path By default, profile store files are saved in a relative file path. Try to use a relative path, unless your implementation requires an absolute path.
The relative path selection brings up a window like the one in
Figure 24‑7. The default file extension is .acconnprofiles and the displayed location is the Resource folder in your workspace.
Figure 24‑7 Specifying a store file name
13 Select a folder in the suggested location and specify the file name, if you have not entered it in the previous step. Choose OK.
14 Deselect Encrypt file content if you wish not to encrypt. The option to encrypt is default.
15 In Create a Connection Profile Store, choose OK.
The selected relative path, in this example ReportDesigns/Products.acconnprofiles, appears in Connection Profile Store box as shown in
Figure 24‑8.
Figure 24‑8 Selecting the store path
16 Choose Next.
5 If you see a window, such as the one shown in
Figure 24‑9, choose Test Connection. If the connection is successful, choose Finish to save the connection profile.
Figure 24‑9 Testing the connection