Binding a connection profile name to a report parameter
You can also externalize a connection profile name for a data source by binding it to a report parameter. The next example shows how to create a report design that uses a CSV file as a data source, using Actuate BIRT Designer Professional. At design time, the report design uses the CSV file in the folder, C:\ConnProfile\Testing. Typically, the design time CSV file contains only a few records. In the production environment, the CSV file, which contains more records, is in the folder, C:\ConnProfile\Production. You create two connection profiles, one for the testing database and one for the production database, and pass the name of the connection profile as a parameter at run time. In this way, the report runs as expected in development and production environments.
How to bind Connection Profile Store URL property to a report parameter
1  
2  
3  
4  
5  
6  
7  
In New Flat File Data Source Profile, choose Enter File URI:, and choose Browse to select the testing database file, which is C:\ConnProfile\Testing\csvTestODA.csv, in this example.
8  
Products-testing profile appears in the Create a Connection Profile Store list, as shown in Figure 27-17.
Figure 27-17  
9  
10  
In New Connection Profile, choose Flat File Data Source and enter Products-Production as a connection profile name.
11  
12  
C:\ConnProfile\Production\csvTestODA.csv.
13  
14  
Products-production appears in Create a Connection Profile Store list.
15  
16  
Create a Connection Profile store appears, showing Resources folder.
Figure 27-18  
17  
Figure 27-19  
18  
19  
Select Connection Profile appears, as shown in Figure 27-20, prompting you to select a connection profile for the data source.
20  
21  
22  
Figure 27-20  
23  
Products data source appears in Data Explorer.
24  
25  
Figure 27-21  
26  
27  
28  
Select the connection profile name:
29  
Figure 27-22  
30  
31  
params["ConnProfileName"].value
Alternatively, you can select Fx to use Expression Builder to create the expression.
Figure 27-23  
32  
33  
Select Preview. In Parameters, enter Products-production to choose the production database as a data source. The report displays a large set of data, as shown in Figure 27-24.
Figure 27-24  

Additional Links:

Copyright Actuate Corporation 2012