separate (Tracker.Report_Generator)
procedure Subsystem_Summary is
    ----------------------------------------------------------------------
    --|  NAME:  SUBSYSTEM_SUMMARY
    --|
    --|  OVERVIEW:
    --|    This report is a two dimensional matrix that presents a summary
    --|    of the remaining man-hours of work for each person on the project
    --|    in relation to each subsystem.  The personnel are displayed on
    --|    the x-axis and the subsytems on the y-axis.  Man-hour calculations
    --|    are based on current work units.  The data printed includes
    --|    remaining man-hours of work for each person by subsystem, the
    --|    total remaining work in man-hours for each person, the total
    --|    remaining work in man-hours to complete each subsystem, the total
    --|    remaining work for the entire project (sum of subsystem totals),
    --|    the percent complete for each subsystem, and the percent complete
    --|    for the entire project.  If more than 10 people are assigned to
    --|    the project, the subsystem summary report is repeated listing 10
    --|    people at a time until all people have been included on a report.
    --|
    --|  EXCEPTIONS HANDLED:
    --|    others   an error message is printed and execution continues
    --|
    --|  HISTORY:
    --|    written by   Bonnie Burkhardt   March 1985
    ----------------------------------------------------------------------

    use Ac_List_Pkg;
    use El_List_Pkg;
    use Ss_List_Pkg;
    use Pr_List_Pkg;

    Header1 : String (1 .. 132) := (others => ' ');
    Header2 : String (1 .. 132) := (others => ' ');
    Header_Lines : String (1 .. 132) := (others => ' ');

    End_List : Boolean := False;
    Max_Pr_On_Page : constant Integer := 10;
    Pr_Initials : array (1 .. Num_Of_People) of Pr_Init_Type :=
       (others => "  ");
    Pr_Index : Integer := 0;
    Pr_Ptr : Personnel_Pointer;
    Ss_Index : Integer := 0;
    Ss_Ptr : Subsystem_Pointer;
    Start_Pr : Integer := 1;
    Stop_Pr : Integer := Num_Of_People;
    Title : constant String := "SUBSYSTEM SUMMARY REPORT";
    Time_Done : array (1 .. Num_Of_People) of Float := (others => 0.0);
    Tot_Time_Done : array (1 .. Num_Of_People) of Float := (others => 0.0);
    Ss_Time : Float := 0.0;
    Tot_Ss_Time : Float := 0.0;

    procedure Calc_Sumss_Totals is separate;
    procedure Init_Sumss_Headers is separate;
    procedure Print_Sumss is separate;
    procedure Print_Sumss_Totals is separate;

begin
    -- initialize the initials array
    Start_Walk (Pr_List);
    Pr_Index := 0;

    loop
        Walk (Pr_List, Pr_Ptr, End_List);
        exit when End_List;
        Pr_Index := Pr_Index + 1;
        Pr_Initials (Pr_Index) := Pr_Ptr.Initials;
    end loop;

    -- print out each page of the report, only 10 personnel will fit on a page
    while Start_Pr <= Num_Of_People loop
        if Stop_Pr - Start_Pr >= Max_Pr_On_Page then
            Stop_Pr := Start_Pr + Max_Pr_On_Page - 1;
        else
            Stop_Pr := Num_Of_People;
        end if;

        Init_Sumss_Headers;
        Start_Page (Title, "", Header1, Header2, Header_Lines);

        -- print out each subsystem's time left
        Ss_Index := 0;
        Start_Walk (Ss_List);

        loop
            Ss_Index := Ss_Index + 1;
            Walk (Ss_List, Ss_Ptr, End_List);
            exit when End_List;
            Calc_Sumss_Totals;
            Print_Sumss;
        end loop;

        Print_Sumss_Totals;
        Start_Pr := Start_Pr + Max_Pr_On_Page;
    end loop;
exception
    when others =>
        Put_Line ("exception raised in LIST BY SUBSYSTEM REPORT");
end Subsystem_Summary;

