Slip data processing apparatus

Abstract: When at least word data amount of one record are output from a plurality of words which have prelimi­ narily been stored, a slip in which word names are arranged is output. The word data are output together with word names, provided that the word names are set corresponding to the word data. The word data are out­ put with an label appended provided that the label is described corresponding to the word data. When at least one record data comprising a plurality of words are input' processing contents corresponding to the respec­ tive words are preliminarily defined. Thus, the pro­ cessing operations corresponding to the respective words are automatically executed on the input data.

Description: The present invention relates to a slip data processing apparatus according to the precharacterizing part of claim 1. Such an apparatus is already known from EP-A-209 907. EP-A-209 907 describes a slip data processing apparatus into which a user can input different types of basic management data in accordance with a single format transfer slip. A respective example of such a transfer slip is shown in Figure 2 of EP-A-209 907. During input of data, the single general slip format is displayed on a display means. The user has to input a large number of words and users of all different business fields have to use the same slip format. Business firms use a large number of types of business slips or forms, including, for example, order-acceptance slips, sales slips, purchase slips, and transfer slips of traveling-expense statement of accounts, credit slips, and the like. Throughout the following description, such slips, forms, records etc. are referred to as "slips" for ease of designation. In the prior art, and as it is described for example in JBM Systems Journal, Vol.21, no.3, 1982, pages 327-350, New York, USA, when slip data are printed by using a slip data processing apparatus and the like, a slip data print program is started in response to a command input from a keyboard, and the slip data are sequentially printed under control of the print program. Further, when slip data is input by using a slip data processing apparatus, a slip data input program is started in response to a command input from the key-board, and the slip data are sequentially input under control of the slip data input program. However, in order to print the slip data in various formats, corresponding print programs for the slip data must be prepared. Furthermore, the slip data print programs are usually coded by using a program language. For example, the print positions of data and the slip format must be described by using a program language, thereby requiring much skilled labor. Accordingly, it is difficult for a general user to prepare and modify such programs. Further, in order to adapt the slip data processing apparatus to various slip input formats, the corresponding slip input programs must be prepared by using a program language. Accordingly, it is difficult for a general user to prepare and modify such programs. It is the object of the present invention to provide a slip data processing apparatus which is able to operate with different slip formats. This object is solved by the subject matter of claim 1. This invention can be more fully understood from the following detailed description when taken in conjunction with the accompanying drawings, in which: Fig. 1 is an outer view of a compact slip data processing apparatus for inputting slip data; Fig. 2 is a circuit diagram of the slip data processing apparatus; Fig. 3 is a view showing set data stored in word setting memory 22; Figs. 4A and 4B are views showing corresponding data stored in word correspondence memory 28; Figs. 5A and 5B are flowcharts showing an input processing operation of the slip data processing apparatus; Figs. 6A and 6B are flowcharts showing a print processing operation of the slip data processing apparatus; Figs. 7A through 7H are views each showing a slip form of one line to be printed in the print processing operation; Fig. 8 is a view showing a print example of a slip printed by printing section 33 of the slip data processing apparatus; Fig. 9 is a flowchart showing details of the print processing in Fig. 6; Fig. 10 is a constructional view showing print buffer PB of print processing section 32 of the slip data processing apparatus; Figs. 11A through 11C are flowcharts showing another example of the print operation of the slip data processing apparatus; Figs. 12A through 12I are views showing a slip form of one line to be printed in the print operation in Fig. 11; Fig. 13 is a view showing a print example of a slip printed by the print operation in Fig. 11; and Fig. 14 is a view showing a slip in Fig. 13 in a folded condition. Fig. 1 is an outer view showing a hand-held slip data processing apparatus provided with a printer. Main body 11 is provided with keyboard 12 and display panel 13 at its front portion, and power switch PWSW at one of its side portions. Mode switch MDSW on keyboard 12 selects an input mode, a transfer mode, and a registration mode corresponding to its switching positions. The "input mode" designates an input of slip data. The "transfer mode" designates a transfer of the input slip data to an external unit (a host computer). Further, the "registration mode" designates a registration in a predetermined memory of set data defining processing contents corresponding to the respective words constituting the slip data. Further, keyboard 12 is provided with numeric keys AK, decimal point key BK, clear key CK, word delimiter key DK which is activated each time input of one word data is completed, slip designation key EK, record delimiter key FK which is activated each time input of one record data is completed, input completion key GK which is activated each time input of all the data amount to one slip is completed, and print key HK for printing the input data in a slip form manner. Display panel 13 comprises a word label display section 13-1 which dot-matrix displays the word name in character or in numeric form, and a word data display section 13-2 which displays the word data. Further, printer 14 prints data in a predetermined slip form. Further, terminal main body 11 is provided with, at its bottom, a transceiver section for transmitting and receiving data to or from the external unit by using an optical signal. Fig. 2 is a view showing a circuit arrangement of the slip data processing apparatus. Input processing section 21 sequentially reads the set data defining processing contents corresponding to the respective words constituting a predetermined slip which has preliminarily been stored in word setting memory 22. Prior to the reading, a slip No. (a slip number indicating a type of slip) is input from input section 23 to word setting memory 22. Thus, word setting memory 22 outputs the word name data corresponding to the input slip number. When the word name data read out from word setting memory 22 designates the input of data from input section 23, input processing section 21 waits for the input of the data. On the contrary, when the set data designates another processing word, input processing section 21 generates the word data by using reference memory 24 and the like. In the data input wait state, upon receiving a delimiter command from input section 23 in response to the activation of word delimiter key DK, input processing section 21 takes in, as one word data, the data which have been input by input section 23 and sequentially stored in input memory 25. Input processing section 21 displays the input data taken from input memory 25 or the data generated by using reference memory 24, on display section 26 and writes the data into input data memory 27. Further, upon completing the input of the word data amount to a single slip into input data memory 27, input processing section 21 reads predetermined word data to be sent from input data memory 27 by referring to word correspondence memory 28, and stores the readout word data in transmission data memory 29. Reference memory 24 is provided with index tables A, B, C, and D. In this embodiment, index table A stores, in a form of character data, various purchaser names corresponding to purchaser codes. Index table B stores, in a form of character data, various belonging section names corresponding to belonging section codes. Furthermore, index table C stores, in a form of character data, various item names corresponding to item codes. Further, reference memory 24 stores console data such as current date data (year, month, and date), slip No, and the like. Transceiver section 30 starts in response to a transmission/reception command from input section 23 issued by mode switch MDSW being set to the transfer mode. More specifically, section 30 reads the contents of transmission data memory 29, and transmits, from transceiver section 31 and by using a photoelectric signal, the contents to the external unit such as a host computer. Further, section 30 sets mode switch MDSW to the registration mode to receive and registers the setting data, and the word correspondence data from the external unit in word setting memory 22 and word correspondence memory 28, respectively. Print processing section 32 controls a print processing in accordance with a slip print program which has preliminarily been stored. If print key HK is activated prior to the input of data, input processing section 21 activates print processing section 32 in response to input completion key GK from input section 23, and prints the word data which have been sequentially read out from input data memory 27 on a recording sheet set in printing section 33. Fig. 3 shows various setting data stored in word setting memory 22. A memory area for a single slip of word setting memory 22 comprises title area KY, header area HD, and item area AT. Data to be set in the respective areas can arbitrarily be written by a user depending on slip-type No. Title area KY stores, as a title data, a slip-type No., a slip-type name, and our company's name. Header area HD and item area AT store word contents defining processing contents of word, word names, and label, corresponding to the respective words constituting one record. The setting data defining the word contents comprises an input word and other processing words, and are defined as follows. "a" indicates an input word and defines that the word data be input from input section 23. "b" indicates an index word and defines that the word data be generated by using any one of index tables A, B, C, and D stored in reference memory 24. "c1" indicates a date word and defines that date data be read out from reference memory 24 and a word data be prepared. "d" indicates a constant word and defines that code of accounts receivable code, sales code and the like which follows "d", be directly input as the word data. "e" indicates a totalization word and defines that item amounts be totalized and a word data be generated indicating the totalized result. "x" indicates a calculation word and defines that an arithmetic operation such as unit price x quantity and the like be performed and a word data be generated indicating the calculation result. "∼" indicates a link word which indicates that a plurality of word data designated by word Nos. are combined to issue single word data. For example, belonging section code and a clerk code are combined to produce single word data. "I" and "E" defines the start and completion of an item, respectively. Note that "A", "B", "C", and "D" designates index tables A, B, C, and D stored in reference memory 24. Figs. 4A and 4B show a partial structure of word correspondence memory 28. Word correspondence memory 28 stores a plurality of correspondence tables X, Y, and the like corresponding to the slip-type numbers. Correspondence table X designates a correspondence table between a slip represented by slip-type number "120" designated by a slip data processing apparatus and a slip represented by slip-type number "112" designated by a host computer. Further, correspondence table Y designates a correspondence table between a slip represented by slip-type number "130" designated by an slip data processing apparatus and a slip represented by "123" designated by a host computer. Each correspondence table X, Y stores correspondence data (word number) for making a record format of one slip stored in input data memory 27 correspond to a record format of the corresponding slip processed at a host computer. For example, if the record format of one slip processed at the host computer comprises 14 words designated by the word No. "01", "02", ..., and "14", word numbers for designating the word data stored in input data memory 27 corresponding to the respective words are stored in tables X, Y, and the like. Operation Assume now that the word contents of a slip are defined in word setting memory 22 as shown in Fig. 3. First, in order to designate a slip shown in Fig. 3, numeric keys AK are activated to input slip-type No. "120", and slip designation key EK is activated. Thus, the input processing program of slip data is operated, and input processing section 21 operates in accordance with a flowchart shown in Figs. 5A and 5B. First, section 21 retrieves, from word setting memory 22, a slip type corresponding to an input slip number, designates an address of a start word of a corresponding data of the retrieved slip type (step S1), and reads the word content designated by the address (step S2). Then, section 21 checks, in step S3, whether the read-out word content is an item completion word "E" or not. Since the item completion word "E" is not read out first, section 21 advances to step S4 to check whether the read-out content is input word "a" or some other processing word. Since slip number "120" is designated in this example, the start word thereof, i.e., section 21 reads, as a process word, date word "c1" from header area HD designated by word number "01". Then, section 21 advances to step S9 to check whether the process word is an index word or a date word. If the index word or the date word is determined, section 21 performs, in step S10, a processing in accordance with index word "b" or the date word. If a word other than the index word or the date word is determined, section 21 advances to step S11 to perform a processing corresponding to the word. Since date word "c1" is read out, section 21 read the current date from reference memory 24. Then, section 21 advances to step S7 to write the the date data read out from reference memory 24 into input data memory 27 as a word data whose word number is "01". Then, section 21 advances to step S8 to designate an address of a next word stored in word setting memory 22, and then returns to step S2. Thus, section 21 reads input word "a" from word setting memory 22, determines input word "a" in step S4, and advances to step S5 to read a word name corresponding to input word "a" and causes display section 26 to display the word name on word label display section 13-1. Then, section 21 waits, in step S6, for a word data from input section 23. At this time, word name "slip No." corresponding to word number "02" read out from word setting memory 22 is displayed on word label display section 13-1. Therefore, an operator verifies the word name and inputs a slip number by numeric keys AK of input section 23, and then activates word delimiter key DK. In response to word delimiter key DK, input processing section 21 reads a word data stored in input memory 25 and displays it on word data display section 13-2 of display section 26. Then, section 21 advances to step S7 to write the word data read out from input memory 25 into input data memory 27 as a data whose word number is "02". Thereafter, section 21 advances to step S8 to designate the next word and then returns to step S2. Then, section 21 reads, in step S2, input word "a" corresponding to word number "03" from word setting memory 22, and displays the corresponding word name in step S5. Since the word name corresponding to word number "03" is not stored, section 21 reads and displays the word name corresponding to the next word, i.e., "purchaser". Then, as described above, section 21 waits for an input of word data in step S6. When a purchaser code is input in step S6, section 21 advances to step S7 to write the input purchaser code into input data memory 27 as a data whose word number is "03". Then, section 21 advances to step S8 to designate the next word designation, and then returns to step S2. In step S2, section 21 reads a word content (index word) whose word number is "04" from word setting memory 22. In step S9, section 21 determines the read out index word and advances to step S10 to perform a corresponding index processing. Index word "b03:A" defines to read word data having word number "03" (in this case, purchaser code), read a corresponding word data (for example, xxx company) from index table A stored in reference memory 24, and display it on data display section 13-2 of display section 26. Then, section 21 advances to step S7 to write the word data in input data memory 27 as a word data having word number "04". Then, section 21 advances to step S8 to designate the next word and then returns to step S2. Similarly, section 21 sequentially reads the word content from word setting memory 22, checks whether the read out word content is an input word or other process words, and writes word data in input data memory 27 while executing a corresponding processing. When section 21 detects "e" (totalization word) as the word content, section 21 skips steps S11 and S7, and executes step S8. Upon completing a header processing, section 21 executes an item processing. Upon reading, from word setting memory 22, word "e" indicating that items constituting one record have been completely processed, section 21 detects this in step S3 it and then advances to step S12 to wait for the next key input. Since all the items for one record have been processed, an operator activates record delimiter key FK. Then, section 21 advances to step S13 to copy a header data stored in input data memory 27 in a predetermined position of memory 27 as a header data for the next record. Then, section 21 advances to step S14 to designate a start word of the corresponding record item, and then returns to step S2. As a result, a similar operation is performed for the items constituting one record. When all the records to be processed are input, an operator activates completion key GK. In response to completion key GK, section 21 advances from step S12 to step S15 to determine whether the totalization word "e" is stored in word setting memory 22. In this case, section 21 searches the word contents stored in word setting memory 22 from the start word corresponding to the designated slip type. Since totalization word "e" is stored in a position corresponding to word number "09", section 21 advances to step S16 to perform a totalization operation. Totalization word "e" defines to totalize an amount of each record. Thus, section 21 sequentially reads the amount of each record from input data memory 27, sums them, and writes the total amount in a position of input data memory 27 corresponding to word number "09". Upon completion of inputting word data amount to one slip, section 21 advances to step S17 to refer to word correspondence memory 28, read predetermined word data from input data memory 27, and store the read-out data in transmission data memory 29. More specifically, section 21 selects a table corresponding to a designated slip type (in this case table X corresponding to slip-type number "120") from tables X, Y... stored in word correspondence memory 28. Then, section 21 sequentially reads, from corresponding table X, word numbers "01", "02", "09" of a slip data processing apparatus. Among the word data constituting one slip corresponding to the designated slip type and stored in input data memory 27, section 21 reads word data designated by the word numbers sequentially read out from corresponding table X, and stores them in transmission data memory 29. As described above, by storing word data read out from input data memory 27 in transmission data memory 29 while referring to word correspondence memory 28, an arrangement of word data stored in memory 29 coincides with a record format adopted in a host computer. In step S18, section 21 determines whether a print designation flag is set indicating that print key HK has been activated before the data input. If the print designation flag is set in a memory within print processing section 32, section 21 executes step S19. A detailed processing operation of step S19 is shown in Figs. 6A and 6B and will be described later. The execution of step S19 supplies data stored in input data memory 27 to print section 33 to be printed on a recording sheet. When data stored in transmission data memory 29 in step S17 are transmitted to a host computer, an operator sets mode switch MDSW to the transfer mode. As a result, transmission/receiving section 30 reads data from transmission data memory 29 and transmits the readout data from transmission/receiving section 31 as an optical signal to a host computer. The operation of step S19 will now be described in detail with reference to Figs. 6A and 6B. An execution of a slip printing program causes print processing section 32 to execute an operation according to a flowchart shown in Figs. 6A and 6B. As a result, a slip as shown in Fig. 8 is printed. Note that Figs. 7A through 7H show forms of one line of a slip formed by the print processing. In a flowchart of Figs. 6A and 6B, print processing section 32 detects, in step A1, set data corresponding to a print-designated slip type, and stored in word set memory 22, and designates an address of the set data. Then, section 32 reads, in step A2, "sales slip", for example. In step A3, section 32 prints a form shown in Fig. 7A, and prints the slip-type name and a form shown in Fig. 7B in the subsequent line. Then, section 32 reads, in step A4, specified word name (for example, "purchaser") and word data (for example, xxx company) corresponding to an address on the slip, from the set data of the designated slip type. Then, section 32 prints, in step A5, the readout specified word name and word data together with the form shown in Fig. 7B in the subsequent line. Furthermore, section 32 reads, in step A6, our address (for example, *** company), and prints them in the subsequent line together with the form shown in Fig. 7B. The above described printing forms three lines including title data and a title within title region X of a sheet as shown in Fig. 8. Then, section 32 advances to step A8 to print a form shown in Fig. 7C indicating an end of the title form (which also serves as a start of the next header form). In step A9, section 32 designates an address of the start word stored in word setting memory 22, i.e., the start word of the designated slip type. Then, section 32 reads in step A10 word contents corresponding to the designated word from input data memory 27, and checks in step A11 whether the readout word contents designates a header end, i.e., item start word "I". If the word content is not the header end, section 32 checks, in step A13, whether the word content is item completion word "E". If the word content is not the item completion word, section 32 advances to step A14 to read a word name corresponding to the designated word from word setting memory 22, and checks in step A15 the presence or absence of the description of the word name. As a result, if the word name is described corresponding to the designated word, section 32 checks in step A16 whether the word name is the specified word name of "purchaser". For the first time, section 32 reads a word name of "date", executes steps A15 and A16, and reads, in step A17, word data corresponding to a designated word from input data memory 27. Then, in step A18, section 32 prints the word data together with the word name and the label read out from word setting memory 22, and furthermore prints a form as shown in Fig. 7F. Since the label is not described in the date word, it is not printed. Then, section 32 advances to step A19 to designate an address of the next word stored in input data memory 27, and then returns to step A10. In step A10, section 32 reads input word "a" from word setting memory 22. In this case, word name "slip No." is described in the designated word. Thus, section 32 prints word data, word name, and the forms, similar to a case as described above. In step A15, section 32 detects that the word corresponding to word No. "03" has no word name to be described, and advances to step A19. Therefore, the word name is not printed. More specifically, the word content in this case is input word "a" which defines to input a purchaser code, and therefore only a purchaser code is stored in the corresponding word stored in input data memory 27. The actual purchaser name is stored in the next word. Therefore, if a word name is preliminarily stored, the printing thereof can be cancelled. In the word corresponding to next word number "04", described is word name "purchaser" (specified word name). In step A16, section 32 detects this, and advances to step A19. Thus, also in this case the word printing is cancelled. More specifically, the "purchaser" is a specified word name, and has already been printed as the title data. Therefore, the word printing is cancelled in order to avoid a double printing. A similar operation is repeated for each word, thereby printing header data and header form, line-by-line. As a result, as shown in Fig. 8, the header data of five lines are printed together with the header form in header area Y on the sheet. After completing the header printing as described above, section 32 reads item start word "I" from word setting memory 22 in step A10, and determines it in step A11. Thus, section 32 advances to step A12 to print a page delimiter. More specifically, section 32 prints the page delimiter in order to handle the title data and the header data as one block (one page, for example). In this case, section 32 prints a form having a shape as shown in Fig. 7D, i.e., performs a printing indicating an end of the header form. Then, second 32 performs a line feed to form a one-line space. Then, section 32 prints a form shown in Fig. 7E, i.e., performs a printing for designating a start position of the item. As a result, as shown in Fig. 8, page delimiting portion P1 is formed at the bottom of header area Y. Accordingly, title area X and header area Y of a first page of a slip are printed. From the second through end pages of the slip are printing areas of item data. In this case, section 32 advances from step A13 to step A14 until a plurality of word data constituting one item are printed. Thus, in steps A10 through A14, section 32 prints item data and word names line-by-line together with the form and the like. Upon completing of printing one item, section 32 advances to step A20 to check whether the above processing is completed for all the data stored in input data memory 27. If NO is determined, section 32 advances to step A21 and increments the item-number counter CT by one. Section 32 compares a value of item-number counter CT with the set item number stored in word setting memory 22 in step A22. Since the one-item printing has been completed at this time, the value of item-number counter CT, and the set item number stored in word setting memory 22 are "1" and "3", respectively. Therefore, section 32 determines in step A22 the non-coincidence between them and advances to step A26 to print an item delimiter. In the item delimiter printing, section 32 prints a form as shown in Fig. 7G. Then, section 32 advances to step A25 to designate the start word of the next item stored in word setting memory 22, and then returns to step A10 to repeat the above operations. As a result, the item delimiter is printed each time the one-item printing is completed. This operation is repeated until the value of item-number counter CT coincides with the set item number "3". As a result of the repetition, three items each comprising four words are printed in item area Z-1 on the sheet, and the delimiter printing is performed for every one item, as shown in Fig. 8. When the value of item-number counter CT coincides with the set item number, section 32 advances to step A23 to print the page delimiter as described above. For this reason, three items of data are printed in the second page of the slip. When the second page is printed as described above, section 32 clears the item counter CT in step A24, and thereafter advances to step A25 to perform a same operation as described above. Thus, section 32 repetitively executes steps A20 through A25 until an end of data is detected in step A20. Assume now that five items of data are stored in input data memory 27. In this case, the remaining two items of data are printed in item area Z-2 of the third page of the sheet, as shown in Fig. 8. When section 32 determines an end of data in step A20, it advances to step A27 to print a form indicating an end delimiter as shown in Fig. 7H. Then, section 32 resets a print flag in step A28. In steps A5, A7, and A18, an example has been described wherein the print positions of the word names, the word data, and the like are preliminarily determined by the system. However, the print positions of the word names and the word data can arbitrarily be specified. In this case, a user preliminarily stores specific data designating print positions of the word names and the word data to be printed, corresponding to the respective words, to thereby arbitrarily set the print format of a slip. The print processing section 30 prints the word names, the word data and the like in accordance with the specific data stored in the memory. Slips printed on a roll-formed paper can be folded at a boundary of page delimiter portions P1 and P2 of each page. In this case, the number of items stored in word setting memory 22 can arbitrarily be designated by a user. In this case, it is preferable to determine the number of items so that the length of the first page and each of the succeeding pages are almost equal, based on the number of words to be printed in the first page or the number of words of one item. Note that forms used for the item delimiter print-ing and the page delimiter printing are not limited to the above embodiments, and various forms may arbitrarily be used unless there are distinctions between them. As described above, a word name and a word data are printed line-by-line. Therefore, even if the header and the number of words constituting the item differs depending on a user, the printing of a slip in its longitudinal direction and having an arbitrary length, enables printing of a slip having any number of words. As a result, a compact-size printer can be used. Fig. 9 is a flowchart for explaining a detailed operation of the printing processing (step A18) shown in Fig. 6. Fig. 10 shows an arrangement of print buffer PB provided in print processing section 32. Print buffer PB comprises an one-line buffer constituted by 22 digits. Digits P0, P10, and P21 store a vertical line code, digits P11 through P20 store a word name, and digits P1 through P9 store word data and an label. In step A18-1 in Fig. 9, print processing section 32 sets the vertical line codes in digits P0, P10, and P21 of the print buffer PB. Then, section 32 sets, in step A18-2, the word name in digits P1 through P10. Furthermore, section 32 sets, in step A18-3, the word data in digits P1 through P9. When the word data comprises a character string, the word data are sequentially input from an upper digit to a lower digit while the first digit of the character string being aligned with P9. When the word data comprises numeric data, the numeric data are sequentially input from the least significant digit to the most significant digit while the least significant digit being aligned with P1. If the label is present, section 32 sets in step A18-4 the label in the digit next to the word data. After storing data of one line in print buffer PB as described above, section 32 advances to step A18-5 to supply the contents of buffer PB to printing section 33 to print them. As a result, one line of data is printed, including the word name, word data, label, in the form shown in Fig. 7F. In another example, said word data comprising numeric data are sequentially input from an upper digit while the most significant digit of the numeric data string being aligned with P9. If the label is present, section 32 sets in step A18-4 the label in the digit next to the least significant digit of the numeric data. Another example of the print operation in step S19 in Fig. 5 will now be described with reference to a flowchart in Figs. 11A through 11C. In this example, a printing allocation on a recording sheet is automatically determined depending on the number of items of data. Figs. 12A through 12I show forms for one line as those in Fig. 7 except that a form indicating a fold shown in Fig. 12I is additionally provided. First, in step B1, print processing section 32 feeds a sheet by a predetermined number of lines (in this embodiment four lines) in order to form a binding space. Then, section 32 prints, in step B2, a form as shown in Fig. 12A to print a title form. More specifically, section 32 prints a form indicating a start of the title. In step B3, section 32 sequentially prints title data of one word line-by-line as well as forms contiguous to the start of the title form. More specifically, section 32 designates set data stored in word setting memory 22 corresponding to a designated slip type, reads "slip type name" from the set data and prints it together with the form shown in Fig. 12B. Then, section 32 retrieves specified word name "purchaser" from the set data of the specified slip type, reads word data "purchaser name" corresponding to the specified word name, from input data memory 27, and prints the word data, the specified word name, and the form. Furthermore, section 32 reads "our name" from word setting memory 22 and prints it together with the form. As a result, three lines of title data are printed together with the title form on title area X-1 of the sheet, as shown in Fig. 13. In this case, print processing section increments by one line number counter ℓ H incorporated therein. Since one word of title data is printed in every other line, the value of counter ℓ H is "6". In step B4, section 32 prints an end of title form (which serves also as the start of the next header form), as shown in Fig. 12C. Also in this case, section 32 increments line number counter ℓ H , and therefore, a value thereof becomes "7". In step B5, section 32 designates the start word stored in word setting memory 22, i.e., the start word of the designated slip type. Then, in step B6, section 32 reads the word content corresponding to the designated word from word setting memory 22, and checks, in step B7, whether the readout content indicates an end of header, i.e., item start work "I". If the word content is not the end of header section 32 advances to step B14. In this case, the word content is not the item completion word "E". Thus, section 32 advances to step B16 to read the word name corresponding to the word content from word setting memory 22, and checks, in step B17, whether the word name has been described. If the word name has been described corresponding to the designated word, section 32 checks, in step B18, whether the word name is the specified word name of "purchaser" above described. Since word name of "date" is read out first, both determinations in steps B17 and B18 are affirmative, section 32 checks, in step B19, the word data corresponding to a specified word from input data memory 27, and prints, in step B20, the readout word data together with the word name read out from word setting memory 22 and the label. Furthermore, section 32 prints a form shown in Fig. 7F. Section 32 Increments line number counter ℓ H by one and thus, a value thereof becomes "8". Since in this case the label is not described, the printing thereof is not performed. Then, section 32 advances to step B21, to designate the next word, and then returns to step B6. In step B6, section 32 reads input word "a" from word setting memory 22. In this case, since word name "slip-type No." is described in the designated word, section 32 prints the word data, word name, and the field framing line. Then, a word corresponding to word number "03" is designated. In this case, the word name is not described. Section 32 detects it in step B17 and advances to step B21. Therefore, the word is not printed. More specifically, the word contents in this case is an input word "a" which defines an input of the purchaser code. Thus, only the purchaser code is stored in a correspondence word stored in input data memory 27, and actual purchaser name is stored in the succeeding word. In this case, if the word name is not preliminarily described, the printing thereof can be canceled. In a word corresponding to word number "04", word name "purchaser" (specified word name) is described. In this case, section 32 detects it in step B18 and advances to step B21. Thus, also in this case, the word printing is canceled. More specifically, the "purchaser"is a specified word name and has already been printed as the title data. Thus, in order to avoid printing it twice, the printing of the "purchaser" of the second occurrence is canceled. A similar operation is sequentially repeated word-by-word to print the header data and the header form line-by-line. As a result, five lines of word data are printed in header area X-2 as shown in Fig. 13. At this time, line number counter ℓ H becomes "12". As described above, when the printing of header area X-2 is completed, section 32 reads item start word "I" from word setting memory 22. Section 32 detects it in step B7 and advances to step B8 to print an end of header as shown in Fig. 12H. At this time, a value of line number counter ℓ H is incremented by one and becomes "13". The value of line number counter ℓ H represents a number of lines obtained by summing up the lines constituting header area X-1 and X-2 (hereinafter to be referred to as header area X). Therefore, line number counter ℓ H is used as the line number counter for the heading area. As described above, when section 32 completes printing of the heading area X, it calculates a number of items S in step B9. More specifically, section 32 refers to the number of items stored in word setting memory 22, and calculates the number of words to be printed among words corresponding to a number of the set items, by retrieving the contents of input data memory 27. The number of set items is "3" and the number of words to be printed is four per item. Thus, the total number of words to be printed amounts to 12. Thus, section 32 calculates the number of item lines Sℓ I by adding the number of lines "4" (the number of items plus a line in which an item form is printed to be described later) to the number of words. Then, section 32 compares the item line number Sℓ I with the line number ℓ H in step B10. At this time, item line number Sℓ I and line number ℓ H are "16" and "13". Thus, section 32 feeds a sheet by an amount of (Sℓ I - ℓ H ) lines (three lines) in step B1, and prints the fold line in step B12. Thus, a space of three lines is formed at the bottom of heading area X, and a horizontal line as shown in Fig. 12I is printed as the folding portion of the sheet. By printing the folding line or portion, a first page (heading area X) of the slip is defined. In this case, in order align the length of the first page with that of a second page, a space for aligning the length is formed at the bottom of heading area X. On the other hand, when section 32 detects, in step B10, line number counter ℓ H ≧ item line number Sℓ I , the space for aligning the length is not formed at the bottom of heading area X. Section 32 sets "1" in a flag register incorporated therein in step B15, and prints the fold line in step B12. Then, section 32 advances to step B13 to print the item start form as shown in Fig. 12E. Then, section 32 checks in step B14 whether all the items are processed. Since item start word "I" is read out, section 32 advances to step B16 to read the word name. Then, section 32 prints, in step B20, item data, word name, and item form word-by-word as described above. In this case, section 32 increments line number counter ℓ I by one each time it prints one word of item data. When section 32 completes printing of one item, it reads item completion word "E" from word setting memory 22. Section 32 detects it in step B14, and advances to step B22 to check whether the above described operation is performed for all the data stored in input data memory 27. If NO is determined in step B22, section 32 advances to step B23 to increment item number counter IC incorporated therein by one. Then, section 32 compares, in step B24, a value of item number counter IC with the number of items stored in word setting memory 22. Since printing for one item is completed now, the value of item number counter IC is "1", and the set item number stored in word setting memory 22 is "3". Accordingly, section 32 detects non-coincidence between them, and advances to step B32 to print the item delimiter as shown in Fig. 12G. In this case, section 32 increments line number counter ℓ I by one. Then, section 32 advances to step B31 to designate the start word of the succeeding item stored in word setting memory 22. Then, section 32 returns to step B6 and repeats the above described operation. As a result, each time printing of one item is completed, the item delimiter is printed. Such operation is repeated until the value of item number counter IC coincides with the set item number "3". As a result, as shown in Fig. 13, three items each comprising four words are printed, and an item delimiter is printed for every item. Simultaneously, the line number counter ℓ I is updated to become "16". When the value of item number counter IC coincides with the set item number, section 32 advances to step B25 to print an end of item as shown in Fig. 12. Then, section 32 checks, in step B26, whether "1" is set in the flag register. As described above, when section 32 detects, in step B10, line number counter ℓ H ≧ item line number Sℓ I , it sets "1" in the flag register. Accordingly, in this case, section 32 advances to step B27 to feed the sheet by (ℓ H - Sℓ I ) lines, and prints the fold line in step B28. By printing the fold line, the second page of the slip is defined. The paper feed is performed in order to align the length of the second page with that of the first page. In this case, line number counter ℓ H and item line number Sℓ I are "13" and "16", respectively. Accordingly, section 32 detects, in step B26, that "1" is not set in the flag register, and prints the fold line without performing the paper feed, in step B28. Fig. 13 shows an example of the printed fold line. The second page of the slip constitutes item area Y in which items 1, 2, and 3 are sequentially printed, and a space for length aligning is not formed at the bottom of item area Y. As described above, when section 32 prints the second page, it advances to step B29 to print a start of item form as shown in Fig. 12E. Then, section 32 clears item line number counter IC and line number counter ℓ I in step B30. Thereafter, section 32 advances to step B31 and repeats steps B6 through B31 until it detects an end of data in step B22. As a result, as shown in Fig. 13, the remaining one item data (data of item 4) is printed in item area Y-2 of the third page. When section 32 detects an end of data in step B22, it advances to step B33 to print the end of item form as shown in Fig. 12H. Then, section 32 feeds a paper by (ℓ H - ℓ I ) lines in step B34. Since line number counter ℓ H and line number counter ℓ I are "16" and "6", respectively, section 32 feeds a paper by 10 lines to form a length aligning space at the bottom of item area Y-2. Then, section 32 advances to step B35 to print the fold line as shown in Fig. 12I, and resets the flag in step B36. The roll-formed paper printed as described above can be folded at the boundary of the fold printing portion (i.e., at the fold line). In this case, as shown in Fig. 14, the fold printing portion of the top of the first page and the fold printing portion of the bottom of the third page are separated. Then, the sheet is folded at the fold portion between the first and second page, and at the fold portion between the second and third pages. Then, the binding in portion formed on the top of the first page is bound by a binder or the like, thereby achieving easy handling and managing of the slips. In the above embodiment, three pages are printed. However, a slip of four pages or more can be printed, depending on the number of items.

Claims: A slip data processing apparatus comprising: slip form storage means (22,24) for storing a slip form including word names; word data input means (23,25) for inputting word data corresponding to the word names; word data storage means (27) for storing the word data input by the word data input means; and outputting means (29,30,31;32,33) for outputting slip data including the word names and the word data, characterized by further comprising: word name input means (23) for inputting by a user a plurality of slip names and a variable number of word names, said word names defining a slip identified by the slip name; word name storage means (22) for storing the slip names, and the word names corresponding to each of the slip names and indicating a word structure of each of the slips, said slip names and said word names being stored as slip data, and said word names being stored in correspondence to the slip names; designation means (23) for designating a slip name prior to input of the word data, so as to read word names of a slip corresponding to the designated slip name and to permit the user to enter the word data; and control means (21) for reading out the word names of the slip corresponding to the designated slip name from the word name storage means (22), and for displaying the readout word names; and with word data corresponding to the readout word names being input by the word data input means (23,25) and stored in the word data storage means (27), said outputting means (29,30,31;32,33) being thereafter activated to output a slip name and an elongated slip, word names corresponding to the output slip name being read out from the word name storage means (22), word data corresponding to the readout word names being read out from the word data storage means (27), and said readout word names and said readout word data being arranged in lines of the elongated slip, thus permitting the elongated slip to correspond to the number of word names read out. A slip data processing apparatus according to claim 1, characterized by further comprising: means (32, FIG. 6A A4) for detecting if the word name in said word name storage means (22) is a predetermined specific word name; and means (32, FIG. 6A A5) for outputting, in a predetermined position of a slip, word data corresponding to the specific word name together with the specific word name, when the word name is detected to be the specific word name. A slip data processing apparatus according to claim 1 or 2, characterized by further comprising: label storage means (22, FIG. 3) for selectively storing a label corresponding to the word name; and means (32, FIG. 6B A18) for reading the label if a label corresponding to the word name read out from said word name storage means is stored in said label storage means, for appending the read-out label to the word data forming one record, and for visually outputting the word data of said one record with said label appended thereto. A slip data processing apparatus according to one of the claims 1-3, characterized by further comprising detecting means (32, FIG. 6B A22, A26) for detecting whether the word data sequentially read out from said word data storage means includes final word data of one item, each item comprising a plurality of word data, and for outputting to said outputting means (33) an item delimiter between items when a final word data is detected by said detecting means. A slip data processing apparatus to claim 4, characterized by further comprising: number-of-item storage means (22, FIG.3) for storing a number of items included in one block, a block comprising at least one item; and detecting means (32, FIG. 6B A22, A23) for detecting if the number of word data read out from said word data storage means corresponds to the number of word data included in the items comprising a block, and for outputting to said outputting means (33) a block delimiter between blocks when said detecting means detects said correspondence of word data. A slip data processing apparatus according to claim 5, characterized by further comprising: means (32, FIG. 11A B11-B13) for forming a fold region for folding the slip between blocks. A slip data processing apparatus according to one of the claims 1-6, characterized by further comprising: word content storage means (22, FIG. 3) for storing setting data for defining an operation corresponding to each of said word data; and processing means (21) for sequentially reading the setting data from said word content storage means (22, FIG. 3), waiting for the input of the word data if the read-out setting data indicates an input operation commanding to input the word data from said input means (23), performing an operation to generate word data if the read-out setting data.indicates another operation, and for writing, into said data storage means, the word data generated by said performing means or the word data input from said input means (23). A slip data processing apparatus according to claim 7, characterized by further comprising: word correspondence storage means (28) for storing correspondence data between respective word data of at least one stored record and respective word data of one record of an external unit; and transmitting means (30) for transmitting, to said external unit, word data designated by said correspondence data, among the word data of said at least one record stored in said word data storage means. The slip data processing apparatus according to one of the claims 1-8, characterized in that a fold region is formed between a region for printing a header data comprised of at least one word data and a region for printing at least one item data, each item data comprising at least one data; and by further comprising: means for determining when a region for printing item data becomes approximately equal in size to the region for printing the header data; and means for forming a fold region every time a region for printing item data is determined to be approximately equal in size to said region for printing the header data. The apparatus according to claim 9, characterized by further comprising means for folding said printing material along said fold regions. The apparatus according to claim 9, wherein said slip comprises a header data region followed by at least two item data regions, a first fold region being formed between the header data region and one of said item data regions, and a second fold region being formed between said at least two item data regions.

Inventors: KASHIO TOSHIO PATENT DEP DEVEL, KASHIO, TOSHIO PATENT DEP. DEVELOPMENT DIV. HAMURA
Applicants: CASIO COMPUTER CO LTD, CASIO COMPUTER COMPANY LIMITED
Application year: 1989
Main classification: G06F17
IPC codes: G07G5, G06Q99