Categories
Crystal Reports Email Ripplestone Scheduler

Using External Parameters for a Scheduled Crystal Report

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.

image

 

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.

image

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.

image

 

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.

Categories
Crystal Reports Printers Printing Printing Ripplestone Scheduler

Printing Crystal Reports from the Scheduler

When trying to send a Crystal Report directly to a printer from the Ripplestone scheduler, you will need to change some settings to allow the scheduler service to have permissions to the printer.

Changing the Login for the Service

By default the Ripplestone scheduler runs as a local system account.  This account usually doesn’t have permissions to print to network printers.

image

 

To allow the service to have permissions to print, change the Log On to a user that does have permissions.  This will require a re-start of the service.

image

 

Install the Printer on the Ripplestone Server

To make sure that the server has the correct driver you will need to install the printer on the Ripplestone server.

By installing the printer, you should also get the printer to display in the drop down list of available printers.  If the printer doesn’t display in the list you can type in into test box to the right of the dropdown.

image

 

Make the Printer the default printer

If the Crystal Report has the No Printer option selected on the Page Setup dialog box, then the printer on the Ripplestone server will need to be selected as the default printer.

image

If you cannot make the printer the default printer, then the No Printer option will need to be un-checked and the report will need to be re-published to Ripplestone.  Once the report has been re-published it can be printed to any printer.  This seems to be a limitation within the Crystal Reports Runtime Engine.