## ___C1ReportsScheduler___name___,
___C1ReportsScheduler___version___

### Overview

C1ReportsScheduler is designed to run ComponentOne Reports tasks in the background on schedules. The following report task types are supported:

- XML report definition loaded into a C1Report component;
- XML report definition imported into a C1PrintDocument component;
- Data bound C1PrintDocument loaded from a C1D/C1DX file;
- Executable user program generating and exporting or printing a report.

For each task, multiple actions can be specified. E.g. a report can be exported to PDF and Excel files, and printed.

Each task also has an associated schedule that specifies when the task needs to be executed.

The C1ReportsScheduler consists of two related interacting parts:

- C1ReportsScheduler Frontend (C1ReportsScheduler.exe; this application).
- C1ReportsScheduler Windows service (C1ReportsSchedulerService.exe).

In the recommended mode of operation, the service (C1ReportsSchedulerService.exe) runs in the background, executing specified tasks according to their schedules. The frontend (C1ReportsScheduler.exe) can be used to view or edit the task list, start or stop schedules, and control the service. While the frontend is used to install and setup the service, it is not needed for the service to run, so normally it would be started to adjust the list of scheduled tasks as needed, and exited. (If the service is installed on a machine, the frontend connects to it automatically when started.)

While not recommended, standalone mode of operation is also possible. In this mode, the frontend is also used to actually run the scheduled tasks. In that case, of course, terminating the frontend app will also stop all schedules.

Note that all service specific operations (installation, setup, and un-installation) can be performed from the frontend application.

### Installation and Setup

When the C1ReportsScheduler.exe is run for the first time, a dialog pops up asking whether you would like to install the C1ReportsScheduler service. Click "Yes" to install the service (recommended). Then a form is shown allowing to set up the service parameters such as the WCF address used by the frontend to communicate with the service, the path of the service configuration file (.c1rsconf), service startup type (manual or automatic), and log options.

Adjust the parameters if necessary (defaults should normally work), and click "OK" to install the service. The progress window should appear, and when it closes the frontend should be running in client mode. This is indicated by the words "client mode" in the form's caption, and "[ Client ]" in the status line (which should also contain an icon showing a gear with a green checkmark).

If you click "No" when asked whether to install the service, the frontend will start in standalone mode, as indicated in the form's caption and status line. You can still add tasks, specify their actions and schedules and start them. The only difference is that in standalone mode you will need to keep the frontend running for the tasks to run on schedules.

Note that when in standalone mode, at any time you can install the service and transfer your task list to it.

To uninstall the service, start the frontend, and select "Uninstall Service..." from the "Service" menu.

### User Interface

The form caption is used to show the current mode (client or standalone).

The status bar has two areas:

- On the far right of the status bar, a small icon and a short text shows the current mode:
  - Client.
  - Standalone.
- If the current task or action has errors, the main status area shows the error description (e.g. the report definition file is not found).

The main C1ReportsScheduler window is divided into three areas:

- The upper part of the main window shows the task list. Each task defines a report or document scheduled for generation.
- The lower left part of the main window shows the list of actions defined for the current task.
- The lower right part of the main window shows the schedule for the current task.

#### Task List

Task list is represented by a grid with the following columns:

- File Name.
  - C1Report/Imported C1Report type of tasks, this is the name of the report definition file.
  - For C1PrintDocument type of tasks, this is the name of C1D/C1DX file containing the document.
  - For External executable type of tasks, this is the name of the executable file to run.
  You may click the button to the right of the file name textbox to select the file.
- Report Name.
  This column is used only for C1Report/Imported C1Report tasks, it specifies the name of the report. It is a combobox, when a report definition file is selected in the first column, the combo dropdown is automatically filled with available reports' names.
- Report Type.
  This column specifies the type of the current task. The following report task types are supported:
  - C1Report.
    For tasks of this type, an instance of C1Report component is used to load the report definition and generate the report.
  - Imported C1Report.
    For tasks of this type, an instance of C1PrintDocument component is used to import the report definition and generate the report.
  - C1PrintDocument.
    For tasks of this type, an instance of C1PrintDocument is used to load and generate the document.
  - External executable.
    Tasks of this type are represented by external programs. The intention is to run applications that rely on code when generating reports.
- Task state (this column does not have a caption).
  This shows a small image representing the current state of the task:
  - A gray ball represents an unchecked task.
  - A green ball represents a successfully checked task that is currently not running.
  - A yellow ball represents a successfully checked task that is currently running.
  - A yellow triangle with an exclamation mark represents a task that has errors.
- Status.
  This column shows the current state of the task:
  - Ready.
    Task is ready but is not scheduled. This is the only status allowing to edit the task.
  - Scheduled.
    Task is scheduled for execution. Changes are not allowed to a task with this status.
  - Busy.
    A scheduled task that is currently running. Changes are not allowed to a task with this status.
  - Paused.
    Task is scheduled for execution but the schedule is paused. Changes are not allowed to a task with this status.

To manipulate task list, use the Task menu or the toolbar on the left of the task grid.

#### Action List

This is the list of actions associated with the current (in the Task List) task. Action list is represented by a grid with the following columns:

- Action.
  This is the type of action. The following action types are supported:
  - Export.
    Exports the report or document represented by the current task to one of the supported external formats.
    This action type is not allowed for External executable type of tasks.
  - Print.
    Prints the report or document represented by the current task.
    This action type is not allowed for External executable type of tasks.
  - Run.
    Runs the executable.
    This action type is only allowed for External executable type of tasks.
- Export Format.
  For export actions, this column specifies the export format. Note that different sets of export formats are available for tasks using C1Report and C1PrintDocument components (this is similar to the way export of those components is handled by the preview controls).
- Output File/Printer Name.
  Specifies either the name of the exported file, or the name of the printer used.
  Click the button to the right of this textbox to select the file or printer name (depending on the action type).
- The last column (without a title) is used to show a small image representing the current status of the action:
  - A gray ball represents an unchecked action that is currently not running.
  - A green ball represents a successfully checked action that is currently not running.
  - A yellow ball represents a successfully checked action that is currently running.
  - A yellow triangle with an exclamation mark represents an action that has errors.

To manipulate action list, use the Action menu or the toolbar on the left of the action grid.

#### Schedule

This panel shows the schedule associated with the current task.

In the upper left part of the panel there are 4 radiobuttons specifying how often the task will run. Note that the first option (One time) allows the task to repeat every specified number of seconds, minutes or hours. Other options are self-explanatory, and as each option is selected, the schedule panel shows different sets of controls.

In the bottom part of the panel, there are two buttons allowing to start, stop, pause or resume the current task. The buttons change depending on the current status of the current task.

To the right of the buttons, the time is shown when the task will run next time.

To manipulate schedule, use the Schedule menu.

### Menu System

- File
  - New
    Clears the current task list.
  - Open
    Opens an existing C1Reports Scheduler configuration file (.c1rsconf).
  - Save
    Saves the current task list.
  - Save As...
    Saves the current task list in a C1Reports Scheduler configuration file (.c1rsconf).
  - Exit
    Closes the program.
- Task
  - Add Task
    Adds a new task to the task list. The task is added to the end of the list, but can be moved up and down in the list using appropriate commands.
  - Remove
    Removes the current task from the list.
  - Move Up
    Moves the current task up in the list.
  - Move Down
    Moves the current task down in the list.
  - Check
    Checks the validity of the current task and all its actions' specification. Things that are checked include the existense and validity of report definition, correctness of output file names and so on. A task is checked automatically when it is scheduled. A successfully checked task has a green ball icon in the "State" column. If a check failed, the task cannot be scheduled, and an exclamation mark icon is displayed. Hover the mouse over that icon to see the error message (it is duplicated in the status line when the task is current).
  - Check All
    Checks the validity of all tasks in the list.
  - Preview
    Generates the current task's report or document, and shows it in a print preview dialog. Note that this command is disabled when the task is scheduled.
- Action
  - Add Action
    Adds a new action to the action list of the current task. The action is added to the end of the list, but can be moved up and down in the list using appropriate commands.
  - Remove
    Removes the current action from the list.
  - Move Up
    Moves the current action up in the list.
  - Move Down
    Moves the current action down in the list.
- Schedule
  - Start
    Starts the current task's schedule. When the schedule is started, the task or its actions cannot be edited.
  - Stop
    Stops the current task's schedule.
  - Pause
    Pauses the current task's schedule.
  - Resume
    Resumes the current task's schedule if it has been paused.
- Service
  - Connect...
    Connects to the C1Reports Scheduler service. This command is only available when the service is running.
  - Disconnect...
    Disconnects from the C1Reports Scheduler service.
  - Transfer Tasks...
    Transfers the current task list to the C1Reports Scheduler service. This command is available when the service is running but the frontend application is disconnected from the service and contains its own task list.
  - Start
    Starts the C1Reports Scheduler service. This command is available when the service is installed on the machine but is not running.
  - Stop
    Stops the C1Reports Scheduler service. This command is available when the service is installed on the machine and is running.
  - Pause
    Pauses the C1Reports Scheduler service. This command is available when the service is installed on the machine and is running.
  - Resume
    Resumes the C1Reports Scheduler service. This command is available when the service is installed on the machine and is paused.
  - Service Setup...
    Launches the C1Reports Scheduler service setup dialog. That dialog allows to adjust the service parameters, and will restart the service when OK is pressed in the dialog. This command is available if the service is installed on the machine.
  - Install Service...
    Installs the C1Reports Scheduler service on the machine. This command is available when the service is not installed on the machine.
  - Uninstall Service...
    Uninstalls the C1Reports Scheduler service. This command is available when the service is installed on the machine.
  - Service Log...
    Shows or shows the window with the C1Reports Scheduler service log.
- Help
  - Contents
    Shows this help file.
  - About
    Shows the about box.