Selecting scheduling options

The user can select a scheduling option from the "Customize your options" drop-down list on the Schedule page. When the user selects a scheduling option, the Menu function is called in schedule.js. This function identifies the menu option value, and then reloads schedule.csp, passing in this value with the tab parameter.

The value of the tab parameter determines what appears on the Schedule page. It can be any of the following:

runtime

When schedule.csp is first loaded, Schedule appears as the option in the "Customize your options" drop-down list, and the tab variable is set to "runtime" by default. On this page, the user can specify a time for running a scheduled report. When the user selects a parameter in the Run Report drop-down list, the run time value is set back into the report's SchedulingInfo object by calling the SendInfo function in schedule.js.

dblogon

Before they can be scheduled successfully, some reports require the user to log on to a database. When the user selects the Database logon option, tab="dblogon" is passed into schedule.csp, and the report's database logon information is displayed.

Users can change the logon information as necessary for their report's database. If the user selects a different data source, the DBSwitch function is called, and the page is reloaded. Logon information that is entered into this page is passed into the DBChange function, and then set back into the Report Object by calling the SendInfo function in schedule.js. The page is then reloaded.

parameters

Some reports use the Crystal Reports' parameters feature. Parameters prompt the report user to enter information. This information determines what data appears in the report. For example, in a report used by sales, there might be a parameter that asks the user to choose a region. The report returns the results for the specific region instead of returning the results for all of the regions.

When users select the Parameters option, tab="parameters" is passed into schedule.csp, and a list of current parameter values are displayed. If a parameter supports discrete values, and if the user is allowed to edit these values, then the parameter values can be added, deleted, or changed. When a new value is added, the checkSingleValue function in schedule.js is called to check the new value type.

If default values are available for a parameter, and if the EnableMultipleValues Property is TRUE, then the user can select one or more values and add them to the current parameter value list. When the user clicks the Add button, the AddValues function is called, the new values are set back into the Report Object, and the page is reloaded.

If a parameter supports range values, similar parameter options are available to the user.

Note:    For information on using the SDK to schedule a report with parameters, see Scheduling a report containing specific parameter values.

formula

Selecting the Filters option causes schedule.csp to reload and tab="formula" to be passed in. If tab="formula", then the report's record and group selection formulas are displayed on the Schedule page. Users can modify these formulas before they schedule the report. Clicking the Update button calls the SendInfo function in schedule.js, which in turn sets the changes back into the Report Object and reloads the page.

destination

When users select the Destination option, tab="destination" is passed into schedule.csp, and a list of destinations are displayed: Default, Unmanaged Disk, Email (SMTP), FTP, and Printer. If users select Unmanaged Disk, Email, or FTP as a destination, they can choose to use either the Crystal Job Server's default settings, or they can specify the destination's scheduling options.

To specify scheduling options and override the Job Server's default settings (global options), values from the report's SchedulingInfo object are copied to the appropriate destination plugin. The following properties allow you to gain access to the SchedulingInfo object's destination scheduling options: SI_PROGID and SI_DEST_SCHEDULEOPTIONS. Clicking the Update button calls the SendInfo function in schedule.js, which in turn sets the changes back into the report's SchedulingInfo Object and reloads the page.

Unlike the other destinations, which are set through the report's SchedulingInfo object, the Printer destination is specified through the Report object. Only reports in Crystal Reports format can be scheduled to a printer.

Note:    For information on using the SDK to schedule a report to a destination, see Scheduling a report to a destination (FTP, SMTP, Disk, Printer).

format

Selecting the Format option causes schedule.csp to reload and tab="format" to be passed in. If tab="format", then a number of available format types are listed. Users can choose a format that the scheduled report will exported to, unless Printer has been specified as a destination option; only reports in Crystal Reports format can be scheduled to a printer. Clicking the Schedule button calls the SendInfo function in schedule.js, which in turn sets the report's ReportFormatOptions and reloads the page.



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com