When running a scheduled Crystal Report in Ripplestone that has at least one parameter, there are times when the list of parameters values is large or comes from a changing source of values.
With Ripplestone you can use this external list of parameter values to burst the report. The scheduled report will run the report once for each set of parameters and optionally use an email address to send the report via email.
Below is an example of how to use the external parameters bursting feature to send a yearly sales report using a parameter to filter the report by country and emailing each report to an email address.
To start you need to create a Database Connection to the data source. In Ripplestone, the database connection page is a centralized location to create the information needed to connect to a data source. It is used by reports, dynamic parameters and external parameters to open and read data.
Create a new database connection with the Connection Type of Dynamic Pick List. The example below is getting the parameter data from SQL Server from a database called ExternalParams. You will also need a valid User ID and Password to connect to the data source.
From a scheduled report, go to the External Parameters tab.
Start by enabling the feature with the checkbox at the top.
Select the database connection created above and add the SQL statement to select the fields that contain the data needed for the report’s parameters and the email address if sending the report via email.
In the example below, the report is getting data from a view called vwGetCountries. It needs the fields Country and Email; the Country field will be used for the first parameter in the report and the Email field will be used to send the report to the email address(es) contained in the field. If more than one email address is in the field separate them with a semi-colon.
The Test link can be used to ensure that the connection works and that the data retrieved is correct. In the example below, it returns three countries.
The mapping section is where you can assign the fields to the reports parameters and to the email address.
Note: If you are using an email address to send the report, you will also need to enable the Email feature and fill in the From, To and Subject lines. The To field will be replaced by the data from the external source.
After setting everything up, the report will run at the scheduled time and run once for each record found in the data source. The report will be saved into the report’s history and email the report, using the email address stored in the data source.