You are on page 1of 6

BusinessObjects Enterprise / Crystal

Reports Server XI R1 and R2


How to send scheduled objects to Secure FTP

Overview
BusinessObjects Enterprise and Crystal Reports Server XI R1 and R2 do
not currently have the capability to send objects to secure FTP (File
Transfer Protocol) destinations out of the box. This document outlines
how to implement a solution.

Contents
INTRODUCTION ............................................................................................ 1
SENDING SCHEDULED OBJECTS TO A SECURE FTP LOCATION ....................... 1
Configuring the Job Servers.........................................................................1
Creating a schedule-based event ..................................................................1
Creating a program to perform a secure FTP ..............................................1
Sample Program.bat file contents ................................................................. 2
Sample script.scr file contents ....................................................................... 2
Sample answerfile.txt contents...................................................................... 3

Publishing the program object .....................................................................3


Scheduling the report...................................................................................4
Scheduling the program object.....................................................................4
The scheduling workflow .............................................................................4

FINDING MORE INFORMATION ....................................................................... 5

8/29/2007 11:47 AM

Copyright 2007 Business Objects. All rights reserved.

BusinessObjects Enterprise / Crystal Reports Server XI R1 and R2

How to send scheduled objects to Secure FTP

Introduction
This document outlines how to implement a solution to send objects to
secure FTP destinations. The final solution involves a two-step process:
scheduling the object with events to an unmanaged disk location, then
scheduling a program object with events to perform the secure FTP.

Sending scheduled objects to a secure FTP location


The major steps to accomplish are to configure the Crystal Reports Job
Server, Desktop Intelligence Job Server and Web Intelligence Job Server.
Configure them to send to an unmanaged disk location, create a
schedule-based event, create a program and script/answer file to run the
secure FTP, publish the program object, and scheduling the report and
program object with events to successfully execute the FTP.

Configuring the Job Servers


The three Job Servers must be configured to enable sending documents
to an unmanaged disk location. To accomplish this, do the following:
1. Logon to the Central Management Console (CMC).
2. Click Servers, then the desired Job Server, and click the Destinations
tab
3. Select the Unmanaged Disk check box and click the Enable button.
4. Select the Unmanaged Disk link to display the properties.
5. Enter a Destination directory.
6. Enter the credentials of a user that has the permission to read, write
and modify files at the location specified.
7. Click Update.

Creating a schedule-based event


To create a schedule-based event, do the following:
1. Logon to the CMC.
2. Click Events. In the Events panel, click the New Event button.
3. Select Schedule for Type, enter an Event Name, select Success under
the Event based on section, and click OK to save.

Creating a program to perform a secure FTP


You will need a program, a script file, and possibly an answer file. The
program object will execute the FTP, calling a script file that contains the
username, password, transfer method, and put command. Secure FTP
will also have to accept a key from the destination server; if the account
8/29/2007 11:47 AM

Copyright 2007 Business Objects. All rights reserved.

boe_xi_r2_sending_scheduled_objects_to_secure_FTP.pdf

Page 1

BusinessObjects Enterprise / Crystal Reports Server XI R1 and R2

How to send scheduled objects to Secure FTP

running the program has not accepted this previously, the question on
whether or not to accept the key will have to be acknowledged by piping
in an answer file to the program. If the key has already been accepted by
the account, having the answer file in place will not affect the transfer.
Examples of the program, script file and answer file are in the next
sections.

Sample Program.bat file contents


In this example, the secure FTP is being sent to a UNIX server.
cd <unmanaged disk location directory>
psftp s:script.scr <unix_machinename>

Here is a breakdown of the commands in the file:

<unmanaged disk location directory> - the location of the


unmanaged disk location that the report was sent to

PSFTP - used to demonstrate using PUTTY secure

s switch references the script filename

<unixmachine> - the name of the destination Unix server

Variations to this would be to specify l ftpuser p ftppass in the


command line instead of in the script file, or using an IP address instead
of the unix_machinename.

Sample script.scr file contents


Ftpuser
Ftppass
Ascii
Put <filename_to_send>.rtf
quit
The put location on the destination server will be the home directory of the Ftpuser or you
can specify a directory if desired (\\<directory>\<subdirectory>\filetosend.rtf).

NOTE

Here is a breakdown of the commands in the file:

8/29/2007 11:47 AM

Ftpuser - your ftp user name

Ftppass - your ftp user password

Ascii - to change the default ftp transfer method from binary to ascii
to remove unwanted control characters

<Filename_to_send>.rtf is the name of the resulting output file from


the report schedule.

Copyright 2007 Business Objects. All rights reserved.

boe_xi_r2_sending_scheduled_objects_to_secure_FTP.pdf

Page 2

BusinessObjects Enterprise / Crystal Reports Server XI R1 and R2

How to send scheduled objects to Secure FTP

The FTP may have a limit per user as to the number of records they are able to transfer
that may need to be increased for larger reports.

NOTE

Sample answerfile.txt contents


Y
NOTE

If you need an answer file, you will have to pipe it into your program PSFTP command, so
that it reads as follows:

Psftp s:script.scr <unix_machinename> < answerfile.txt

Publishing the program object


Upload the program object by doing the following:
NOTE

The program should be run manually in a cmd window before uploading to ensure it can
complete successfully. Program Job Server logs on the server will not have any
information on a program failure, just that it failed.

1. Logon to the CMC.


2. Click Objects > New Object > Program.
3. Browse to the program location, select Executable for the Program
Type, select a folder to save to under Destination, and click Submit.
You will also need to either set the program object settings to run as an
account that has the proper permissions on the operating system, or set
the system settings to enter these credentials. For the specific program
object do the following:
1. Select the object in the CMC.
2. Click the Process tab and click the Logon tab.
3. Enter a User Name and Password.
4. Click Update.
To set this for all program objects do the following:
1. In the CMC, click Objects> Object Settings button > Program
Objects tab
2. Select the Run scripts/binaries option under the Allow users to
section
3. Select the Schedule with the following operating system
credentials option under the If credentials are not specified at
schedule time then section
4. Enter a User Name and Password.
5. Click Update.

8/29/2007 11:47 AM

Copyright 2007 Business Objects. All rights reserved.

boe_xi_r2_sending_scheduled_objects_to_secure_FTP.pdf

Page 3

BusinessObjects Enterprise / Crystal Reports Server XI R1 and R2

How to send scheduled objects to Secure FTP

Scheduling the report


Schedule the report to an unmanaged disk location by doing the
following:
1. In CMC, click Home, click the object/report, and click the Schedule
tab.
2. Select the desired recurrence pattern (Once, Daily, etc) and in the
Run drop-down make sure with events is specified in your
selection.
3. In the Available Schedule Events list, select the schedule event you
created.
4. Click the Add > button to add it to the Events to trigger upon
completion list.
5. Click the Schedule button.
NOTE

Remember the time (hour) you select, as this comes into play later. In the example
0200hrs is used.

Scheduling the program object


Schedule the program object by doing the following:
1. In CMC, click Home, click the program object and click the Schedule
tab.
2. Select the desired recurrence pattern (Once, Daily, etc) and in the
Run drop-down make sure with events is specified in your
selection.
NOTE

This is where the schedule time of the report job is important. If the report job is
scheduled at 0200hrs, schedule this program object to run at 0159hrs, so that the event
schedule poll is running before the report schedule kicks off. The event schedule must be
polling before the report job runs in order to note the success.

3. In the Available Events list, select the schedule event you created.
4. Click the Add > button to add it to the Events to wait for list.
5. Click the Schedule button.

The scheduling workflow


Here is the scheduling workflow based on our examples:
1. At 0159hrs the program object begins polling for a successful event.
2. At 0200hrs, the job schedule executes, scheduling the report to an
unmanaged disk location on the local server.
3. When the job completes successfully, it sets the schedule event to
success.

8/29/2007 11:47 AM

Copyright 2007 Business Objects. All rights reserved.

boe_xi_r2_sending_scheduled_objects_to_secure_FTP.pdf

Page 4

BusinessObjects Enterprise / Crystal Reports Server XI R1 and R2

How to send scheduled objects to Secure FTP

4. The program job schedule notes the success, and runs the FTP
program.
5. The FTP program calls the script file to put the file to the destination
server.
6. If necessary, the program also pipes in an answer file to answer the
"Do you want to accept this key?" question posed by the destination
server.

Finding more information


For more information and resources, refer to the product documentation
and visit the support area of the web site at
http://www.businessobjects.com/
For more information about scheduling and publishing objects read the
BusinessObjects Enterprise Admin guide:

8/29/2007 11:47 AM

XI Release 1 - Chapters 15 and 18

XI Release 2 - Chapters 13 and 16

Copyright 2007 Business Objects. All rights reserved.

boe_xi_r2_sending_scheduled_objects_to_secure_FTP.pdf

Page 5

You might also like