Data communication apparatus with usage-reports by user
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a data communication apparatus, and more particularly to a data processing apparatus which can output a communication control report of data communication. 
     2. Related Background Art 
     A facsimile device has been known as one of the devices of this type. A plurality of user names are registered in the facsimile device. An operator selects his/her user name to send an image, and the user name is inserted at the top of the scanned image. In a transmitter which complies with the G3 standard, the user name is inserted in the TSI signal so that the receiving party can recognize the user name. 
     Further, the user names are listed in a communication result report at the sending device so that users can recognize who sent what messages and how many. 
     However, in the prior art device, a plurality of part communication results are outputted in the communication result report in the order of communication. Accordingly, where it is desired to know the total communication amount for a particular user, the operator must manually select the communication results of the particular user from the communication results arranged in the order of communication. This work is troublesome. 
     U.S. Pat. Nos. 4,843,479, 4,729,637 and 4,870,503 relate to devices of this type but none of them proposes a solution to the above problem. 
     SUMMARY OF THE INVENTION 
     In the light of the above, it is an object of the present invention to improve a data communication apparatus. 
     It is another object of the present invention to provide a data communication apparatus which can output a communication result report by user name. 
     It is another object of the present invention to provide a data communication apparatus which can output a cumulative communication result report for a designated user name. 
     It is another object of the present invention to provide a data communication apparatus which can output communication result records of the same user adjacently, from the communication result reports of a plurality of user names. 
     The another objects of the present invention will be apparent from the following detailed description of the preferred embodiment and the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a block diagram of a facsimile device in accordance with one embodiment of the present invention. 
     FIG. 2 shows a content of a communication result in the embodiment of FIG. 1. 
     FIG. 3 shows a communication result report in the embodiment of FIG. 1. 
     FIG. 4 shows a flow chart of an operation of a controller in the embodiment of FIG. 1. 
     FIG. 5 shows a flow chart of a first report output operation in the embodiment of FIG. 1 and 
     FIG. 6 shows a flow chart of a second report output operation in the embodiment of FIG. 1. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     One embodiment of the present invention is now described with reference to the drawings. 
     FIG. 1 shows a block diagram of a facsimile device in accordance with one embodiment of the present invention. 
     In FIG. 1, a controller 101 comprises a CPU 113, a ROM 114, a RAM 115, a buffer memory 112, a line memory 110 and an encoder/decoder 111, and controls image input/output and an overall communication process. 
     The ROM 114 stores a control program shown in FIGS. 4-6 and to be described later. The RAM 115 is used as a work area for the CPU 113. 
     The image input and output are performed by a reader 100 and a recorder 102. 
     Document image data is read by the reader 100 which comprises a CCD sensor and a document feeder. Received image data or image data read by the reader 100 is a copy mode is recorded on a record sheet by the recorder 102 which may be a thermal printer or an ink jet printer. 
     The input and output of the image data between the reader 100 and the recorder 102, and the encoder/decoder 111 are performed through a line memory 110 line by line. The input and output of data between the encoder/decoder 111 and the communication circuit are controlled by a buffer memory 112 having a unit of processing which is larger than one line (for example, a certain number of pages). The encoder/decoder 111 encodes and decodes in a known manner such as the MH, MR or MMR system to suppress redundancy. It may alternatively be embodied in software of the CPU 113. 
     The connection with a communication line N such as a telephone line and the input and output of data are performed by a modem 106 and a network controller 107 a telephone set (or a hand set) 16 for speech communication and manual control is connected to the network controller 107. 
     The communication operation is controlled through a console panel 103 which comprises a ten-key for entering a telephone number and various function keys. A display 104 for displaying a telephone number and time is provided on the console panel 103. 
     Power necessary to drive the device is supplied from a power supply 105 which may be a switching power supply. The supply of powers to the respective units is also controlled by the controller 101. 
     In the present embodiment, information on communication report for one unit of communication (hereinafter one record) comprises a communication mode, a destination telephone number, a destination abbreviation, user name, a start time, a communication time, a number of sheets, a communication result and a charge, as shown in FIG. 2. 
     Forty latest records of the communication result information can be stored in the RAM 115. 
     When the communication results are to be outputted as a report, they are outputted by user name as shown in FIG. 3, and totals of the number of times of communication, the communication times, the numbers of sheets and the charges for each user name are outputted. 
     FIG. 4 shows a flow chart of an operation of the controller 101. 
     In a stand-by mode, if there is no key entry or calling tone from the telephone line, steps S1-S5 are looped to wait for an external input. 
     Unless the user selects one of ten user names which are registerable, an initially designated one is selected. 
     When the user depresses an abbreviation switch (which switches user names) on the console panel 104 (S1), the next user name is selected (S7), it is displayed on the display 104 (S8), and the process returns to the stand-by loop (S1-S5). 
     If the abbreviation key is continuously depressed, the above operation is repeated so that ten user names are cyclically selected and displayed. 
     When a calling signal (telephone bell) is detected (S2), or when a start of communication key is depressed (S3), a receiving or transmitting operation is started (S9). Information on the communication results (communication mode, destination telephone number, destination abbreviation, own user name, start time, communication time, number of sheets, communication result and charge) is stored into the memory 15 as shown in FIG. 2, and the process returns to stand-by loop (S1-S5) (S10). In the transmission mode, the user name last selected in the step S7 is stored, and in the reception mode, it is left blank. 
     When a report key is depressed in the stand-by loop (S4), the memory is stored by record, using the user name as a key (S11). 
     In the present embodiment, the user name is stored in the form of a JIS character code. Accordingly, the contents of the memory are sorted in the sequence of character code. A known sorting method such as a bubble sorting method or a shell sorting method may be used. 
     If a particular user name is selected instead of the initially set user name (S12), a report for only the particular user name is outputted (S13), and the user name is reset to the initially set user name, and the process returns to the stand-by loop (S15). If the user name is the initially set one in S12, all reports are outputted and the process returns to the stand-by loop (S14). 
     FIG. 5 shows a flow chart of the report output operation in the step S14. 
     Counters for counting the total number of sheets, charge, time and number of times of communication for each user name are cleared (S101). One record of communication result is read from the memory, and a sheet counter n, a charge counter y, a time counter t and communication counter c are counted up by the respective communication results (S102) and the records are printed (S103). 
     The presence or absence of the next record is determined (S104). If there is a next record, the user name of the next record is determined (S105). 
     If the user name of the next user is identical to the printed record, the process repeats the printing in S102. If the user name is different, the sheet counter n, the charge counter y, the time counter t and the communication counter c must represent the total number of sheets, charge, time and number of times of the user names printed out so far, and they are printed out together with the user names (S106). 
     The process returns to S101 to clear the sheet counter n, the charge counter y, the time counter t and the communication counter c and start the counting for the next user name. 
     If there is no next record in S104, the sheet counter n, the charge counter y, the time counter t and the communication counter c represent a total of the records having the user names printed out so far. Thus, the user names and the records are printed out and the record print step is terminated (S107). 
     Accordingly, when the record is outputted without selecting a particular user name in the stand-by mode, a record which includes the communication results by user name as well as total number of sheets, charge, time and number of times for each user name are printed out, as shown in FIG. 5. 
     FIG. 6 shows a flow chart of the report output operation in S13. 
     The sheet counter n, the charge counter y, the time counter t and the communication counter c are cleared (S201) and one record is read from the memory (S202). Since a different user name than the initially set one has been selected in S7, the selected user name is compared with a recognized user name. If they do not match, the process proceeds to S206, and if there is a next record, the steps starting from S202 are repeated. 
     If the user names match in S203, the sheet counter n, the charge counter y, the time counter t and the communication counter c are updated, and the record is printed out. Then, the process proceeds to S206 (S205). 
     In this manner, the report is processed for the record having the user name which matches to the user name selected in S7. When there is no next record, the user name as well as the sheet counter n, the charge counter y, the time counter t and the communication counter c are printed out (S207), for example, a portion of FIG. 3 encircled by broken lines is printed out. Thus, only a report which includes the particular user name is selectively outputted. 
     As described above, since the communication result reports are outputted by user name and the total number of sheets, time, charge and number of times for each user name are printed out, it is easy to determine who sent which messages and how many, and how much the charge is, where one facsimile device is shared by a plurality of departments in a company, charge control for the respective departments can be readily performed. 
     When a use status of a particular user is to be checked, the user name is selected in the report output operation so that the report of only that user is outputted, and thus rapid processing is attained. 
     In the present embodiment, both the function to output only the report which includes the particular user name and the function to output the reports by user are used, although an advantage over the prior art device is attained even when only one of the functions is used. 
     In the above embodiment, the facsimile device is described although the present invention is not limited to the facsimile device but is also applicable to any data communication apparatus such as a teletex. 
     The present invention is not limited to the above embodiment but various modifications can be made.