Schedule Report

Operators often request a print out of all scheduled events including the normal weekly schedules and special events. A schedule report can be generated for all of the schedules in a given station by using a bql query.
  • Examining a Typical Schedule

    By default the composite schedule component of a standard schedule is hidden. Accessing the slot sheet of a schedule component allows removing the hidden flag from the composite schedule. Viewing the composite schedule property sheet (see 6-8) helps to understand how the composite schedule is organized and how to construct the bql query.

    Figure 42.   Composite schedule property sheet
    Image

    The main composite schedule consists of a child composite schedule called specialEvents and a week schedule called week. Special events which are added to the schedule and each specific day of the week schedule are all daily schedule type objects.

    Using bql the station can be searched for the daily schedule components. The bql query builder (see 6-9) can be used to create the query or you can simply type the syntax below.

    station:|slot:/|bql:select * from schedule:DailySchedule

    Bql query builder creating query for daily schedule components

    Image

    This basic query for the daily schedule component returns the slot path, property values and names of the sub schedule components. This is not very useful information for an operator, so the query will likely need to be modified to display more specific pertinent information. The property sheet of the daily schedule can be used to get a better idea of what data might be useful to display in the columns (see 6-10).

    DailySchedule property sheet with children components expanded

    Image

    Each daily schedule consists of two child components. The first component is called 'day' which is a day schedule and the second component is called 'days' which is an abstract schedule. The abstract schedule defines the event date and the day schedule defines the event times and event value.

    Image

  • Resolving the Schedule Name

    Since the bql query is for the daily schedule components, it is necessary to use BFormat text to derive the schedule name using the below syntax. The actual schedule component is three levels up the navigation tree from the daily schedule components.

    %parent.parent.parent.displayName%
  • Displaying the Event Date

    The days component returns the actual event date if specified or if it is a weekly schedule then it displays 'weekday schedule'.

  • Displaying the Event Name

    Since the query returns the daily schedules, use 'displayName'.

  • Displaying the Event Times

    The event times are slots of the time schedule which is a child of the daily schedule components. There are individual slots for the start and finish times, which may be displayed using the below syntax.

    day.time.start (displays the time of the first start event) 

    day.time.finish (displays the time of the first stop event) 

    day.time1.start (displays the time of the second start event) 

    day.time1.finsih (displays the time of the second stop event)
  • Filtered Query for Daily Schedules

    Using the above concepts a filtered query can be created to display the desired results. The bql query builder (see 6-11) can be used to create the query or you can simply type the syntax below.

    station:|slot:/|bql:select parent.parent.parent.displayName as 'Schedule',days 
    as 'Event Date',displayName as 'Day Of Week',day.time.start as 'Occ1',day.time.finish 
    as 'Unocc1',day.time1.start as 'Occ2',day.time1.finish as 'Unocc2' from 
    schedule:DailySchedule

    Each daily schedule consists of two child components. The first component is called 'day' which is a day schedule and the second component is called 'days' which is an abstract schedule. The abstract schedule defines the event date and the day schedule defines the event times and event value.

    Figure 43.   Bql query builder creating query for daily schedule components
    Image
  • Filtering by Special Events

    It may also be helpful to filter the results to only display special events, after all people typically know what the standard schedule events are. The bql query builder (see 6-12) can be used to modify the query or simply type the syntax below.

    station:|slot:/|bql:select parent.parent.parent.displayName as 'Schedule',days as 
    'Event Date',displayName as 'Day Of Week',day.time.start as 'Occ1',day.time.finish 
    as 'Unocc1',day.time1.start as 'Occ2',day.time1.finish as 'Unocc2' from 
    schedule:DailySchedule where parent.name = 'specialEvents'
    Figure 44.   Figure 12: bql query builder creating query for special events
    Image