separate (Tracker.Report_Generator.List_By_Subsystem)




procedure Print_Ss_Element is
    ----------------------------------------------------------------------
    --|  NAME:  PRINT_SS_ELEMENT
    --|
    --|  OVERVIEW:
    --|    This procedure prints out an element line. This line includes the
    --|    element data, the remaining man-hours of work to complete this
    --|    element, the original size, the current size, the complexity, and
    --|    the remaining man-hours of work until completion.
    --|
    --|  EXCEPTIONS HANDLED:
    --|    none
    --|
    --|  HISTORY:
    --|    written by   Bonnie Burkhardt   March 1985
    ----------------------------------------------------------------------

    All_Pr_Printed : constant array (1 .. Num_Of_Activities) of Boolean :=
       (others => True);
    Pr_Printing_Done : array (1 .. Num_Of_Activities) of Boolean :=
       (others => False);
    Next_Person : Integer range 1 .. Num_Of_Activities := 1;
    Done : Boolean := True;

begin
    -- print out element
    Set_Col (Report_File, 2);
    Put (Report_File, Ele_Ptr.Milestone_Num, 2);
    Set_Col (Report_File, 5);
    Put (Report_File, Ele_Ptr.Priority, 2);
    Set_Col (Report_File, 8);
    Put (Report_File, Ele_Ptr.Description);
    Set_Col (Report_File, 46);
    Put (Report_File, Ele_Ptr.Desc_Key);
    -- if the element has more than one person assigned to it, print out
    -- the first person

    if not Ele_Ptr.More_Than_One_Person then
        Set_Col (Report_File, 54);
        Put (Report_File, Ele_Ptr.Person_Initials);
        Set_Col (Report_File, 58);

        for Ac_Index in 1 .. Num_Of_Activities loop
            Put (Report_File, Convert
                                 (Ele_Ptr.Activity_Completeness (Ac_Index)));
            Put (Report_File, ' ');
        end loop;
    else
        -- print out the first person assigned
        Set_Col (Report_File, 54);
        Put (Report_File, Ele_Ptr.People_Initials (1));
        Set_Col (Report_File, 58);

        for Ac_Index in 1 .. Num_Of_Activities loop
            if Ele_Ptr.People_Initials (Ac_Index) =
               Ele_Ptr.People_Initials (1) then
                Put (Report_File,
                     Convert (Ele_Ptr.Activity_Completeness (Ac_Index)));
                Put (Report_File, ' ');
                Pr_Printing_Done (Ac_Index) := True;
            else
                Put (Report_File, "* ");
            end if;
        end loop;
    end if;

    Set_Col (Report_File, 82);
    Put (Report_File, Ele_Ptr.Original_Size, 6);
    Set_Col (Report_File, 91);
    Put (Report_File, Ele_Ptr.Current_Size, 6);
    Set_Col (Report_File, 100);
    Put (Report_File, Ele_Ptr.Current_Size - Ele_Ptr.Size_Done_At_Start, 6);
    Set_Col (Report_File, 108);
    Put (Report_File, Ele_Ptr.Date_Size_Verified.Month, 2);
    Put (Report_File, '/');
    Put (Report_File, Ele_Ptr.Date_Size_Verified.Day, 2);
    Put (Report_File, '/');
    Put (Report_File, Ele_Ptr.Date_Size_Verified.Year mod 100, 2);
    Set_Col (Report_File, 118);
    Put (Report_File, Ele_Ptr.Complexity, 3, 2, 0);
    Set_Col (Report_File, 126);
    Put (Report_File, Ele_Ptr.Hours_To_Complete, 5, 1, 0);


    -- print out additional lines if the element is assigned to more than
    -- one person
    if Ele_Ptr.More_Than_One_Person then
        loop
            Done := True;

            for Ac_Index in 1 .. Num_Of_Activities loop
                Done := Done and Pr_Printing_Done (Ac_Index);
            end loop;

            exit when Done;

            -- find the next person to be printed
            Next_Person := 1;

            while Pr_Printing_Done (Next_Person) loop
                Next_Person := Next_Person + 1;
            end loop;

            Set_Col (Report_File, 54);
            Put (Report_File, Ele_Ptr.People_Initials (Next_Person));

            -- print out the activity percent complete for this person
            Set_Col (Report_File, 58);

            for Ac_Index in 1 .. Num_Of_Activities loop
                if Ele_Ptr.People_Initials (Ac_Index) =
                   Ele_Ptr.People_Initials (Next_Person) then
                    Put (Report_File,
                         Convert (Ele_Ptr.Activity_Completeness (Ac_Index)));
                    Put (Report_File, ' ');
                    Pr_Printing_Done (Ac_Index) := True;
                else
                    Put (Report_File, "* ");
                end if;
            end loop;

            Line_Count := Line_Count + 1;
            New_Line (Report_File);
        end loop;
    end if;

    Pr_Printing_Done := (others => False);
end Print_Ss_Element;


