Program, printing system, and control method
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- BROTHER KOGYO KK
- Filing Date
- 2025-01-24
- Publication Date
- 2026-08-05
AI Technical Summary
【0010】 本明細書に開示される技術によれば、データベースを用いてラベルプリンタにラベルを印刷させる場合であって、ラベルプリンタに印刷時を基準として計算された日時を印刷させる場合の、利便性を高める技術が実現される。
Smart Images

Figure 2026126543000001_ABST
Abstract
Description
Technical Field
[0001] The technical field disclosed in this specification relates to a program executable on an information processing apparatus, a printing system, and a control method.
Background Art
[0002] Conventionally, a configuration is known in which printing conditions are written in a tabular database composed of rows and columns, and the database is used to print labels on a label printer. By using such a configuration, for example, labels for multiple types of products can be printed together. Also, for example, as disclosed in Patent Document 1, a configuration for printing the date and time after a certain period of time based on the time of printing for the purpose of printing an expiration date or the like is also known.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] By combining the configuration of printing using the database as described above and the configuration of printing the date and time calculated based on the time of printing as disclosed in Patent Document 1, for example, the date and time after a certain period of time based on the time of printing can be printed on the labels of each product. On the other hand, when different addition times are desired for each product, for example, when different expiration dates are desired to be printed for each product, it is necessary to divide the database for each addition time, which is troublesome.
Means for Solving the Problems
[0005] The program, which was created for the purpose of solving the above-mentioned problems, is executable by an information processing device and has a label editing function, and is configured to cause the information processing device to execute a display process that causes the user interface of the information processing device to display an editing screen on which an editing screen that accepts label editing and on which at least one date and time object indicating a date or time can be placed, a specification process that specifies a tabular database consisting of rows and columns, an object selection process that selects one of the date and time objects placed on the editing screen, and a column selection process that selects one of the columns constituting the database specified in the specification process, in response to a print command, the information processing device is configured to execute a calculation process that calculates the date and time based on the data of the column selected in the column selection process for each row constituting the database specified in the specification process, a generation process that generates label data in which the date and time calculated in the calculation process is written to the date and time object selected in the object selection process, and a print process that causes a label printer connected to the information processing device to print the label data generated in the generation process.
[0006] An information processing device that executes a program having the above configuration selects one of the date and time objects placed on the editing screen, specifies a database, and selects one of the columns that make up the specified database. In response to a print command, the information processing device calculates the date and time for each row (record) of the specified database based on the data in the selected column, using the above program. The information processing device then executes a print process using the above program to generate label data in which the calculated date and time is written to the selected date and time object and prints it. In other words, the information processing device calculates the date and time for each row of the database based on the data in the selected column. As a result, the date and time shown in the date and time object produced by the print process for each row is calculated based on the data in any column, and it is possible to print different calculated dates and times for each row using a single database.
[0007] Another aspect of the technology developed to solve the above-mentioned problems is a printing system comprising a program installed in an information processing device and a label printer capable of communicating with the information processing device, wherein the program can cause the information processing device to perform a display process on the user interface of the information processing device, which is an editing screen for accepting label editing and capable of arranging at least one date and time object indicating a date or time; a specification process for specifying a tabular database consisting of rows and columns; an object selection process for selecting one of the date and time objects arranged on the editing screen; and a column selection process for selecting one of the columns constituting the database specified in the specification process, and the information processing device can further perform a transfer instruction to transfer the date and time object selected in the object selection process and the column indicating the column selected in the column selection process. It is possible to perform a transfer process to transfer template data containing information and the database specified in the specified process to the label printer, the label printer is capable of storing the template data and the database transferred from the information processing device, and the label printer is further configured to read the template data and the database in response to a print command for the template data, perform a main calculation process to calculate the date and time based on the data of the column information included in the read template data for each row constituting the read database, generate label data by writing the date and time calculated in the main calculation process to the date and time object included in the read template data, and perform a label printing process to print based on the generated label data.
[0008] In the printing system having the above configuration, the information processing device, via a program, selects one of the date and time objects placed on the editing screen, specifies a database, and selects one of the columns that make up the specified database. Upon receiving a transfer instruction, the information processing device executes a transfer process to transfer template data containing the date and time object and column information, and the database specified when the template was created, to the label printer. The label printer saves the template data and the database. Upon receiving a main print instruction, the label printer reads the saved template data and database and calculates the date and time for each row of the database based on the data in the selected column. For each row of the database, the label printer executes a main print process to generate and print label data in which the calculated date and time is written to the date and time object included in the template. As a result, the label data generated by the label printer will have the date and time indicated in the date and time object calculated based on the data in any column of the database, allowing for the printing of different calculated date and time results for each row using a single database.
[0009] A control method for realizing the functions of the above-mentioned program or printing system, and a storage medium readable by a computer storing the program, are also novel and useful. [Effects of the Invention]
[0010] The technology disclosed herein provides a method for improving convenience when using a database to print labels on a label printer, and when the label printer prints a date and time calculated based on the time of printing. [Brief explanation of the drawing]
[0011] [Figure 1] This is a schematic diagram of the printing system. [Figure 2] This is a sequence diagram illustrating the procedure for generating and printing label data using a printing application. [Figure 3]This is a diagram for explaining an example of a database. [Figure 4] This is a diagram showing an example of a label editing screen. [Figure 5] This is a diagram showing an example of a label editing screen. [Figure 6] This is a diagram showing an example of a label editing screen. [Figure 7] This is a diagram showing an example of a label editing screen. [Figure 8] This is a flowchart for explaining an example of the procedure of calculation processing. [Figure 9] This is a diagram for explaining an example of a method for specifying addition time. [[ID=第十九]] [Figure 10] This is a diagram for explaining an example of a print setting screen. [Figure 11A] This is a sequence diagram for explaining the procedure of generating and printing label data on the label printer side. [Figure 11B] This is a diagram for explaining an example of a template to be transferred.
Embodiments for Carrying Out the Invention
[0012] Hereinafter, embodiments in which the program is embodied will be described in detail with reference to the accompanying drawings. In this specification, a printing system including a program executable by an information processing apparatus and a label printer capable of communicating with the information processing apparatus is disclosed.
[0013] <Schematic Configuration of PC1> The printing system 100 of this embodiment has a personal computer (hereinafter referred to as "PC") 1 and a label printer 3, and the PC 1 and the label printer 3 are communicably connected. As shown in FIG. 1, the PC 1 includes a controller 10 including a CPU 11 and a memory 12. The PC 1 is an example of an "information processing device". Further, the PC 1 includes a user interface (hereinafter referred to as "user IF") 13 and a communication interface (hereinafter referred to as "communication IF") 14, and these are electrically connected to the controller 10. Note that the controller 10 in FIG. 1 is a general term for the hardware and software used for the control of the PC 1, and does not necessarily represent a single hardware actually existing in the PC 1. Note that an example of the "information processing device" is not limited to the PC 1, and may also be a smartphone or a tablet terminal.
[0014] The CPU 11 executes various processes according to the program read from the memory 12 and based on the user's operations. In the memory 12, various programs including an operating system (hereinafter referred to as "OS") 21 and a printing application program (hereinafter referred to as "printing app") 22, and various data including a database 23 are stored. The memory 12 is also used as a work area when various processes are executed.
[0015] The CPU 11 may read the printing app 22 from a storage medium readable by the CPU 11. As the storage medium readable by the CPU 11, for example, a CD-ROM, a DVD-ROM, a USB memory, etc. can be used.
[0016] The user IF 13 includes hardware for displaying a screen for notifying the user of information and hardware for receiving operations by the user. The user IF 13 of this embodiment is a combination of a display 13a capable of displaying information, a mouse 13b having an input reception function, and a keyboard 13c. Note that the user IF 13 may be a touch panel having a display function and an input reception function.
[0017] The communication interface 14 includes hardware for communicating with external devices such as the label printer 3. The communication standards for the communication interface 14 include Ethernet (registered trademark), Wi-Fi (registered trademark), and USB. PC1 may have multiple communication interfaces 14 that support multiple communication standards.
[0018] The OS21 stored in memory12 of PC1 is, for example, iOS(registered trademark), Android(registered trademark), Windows(registered trademark), macOS(registered trademark), or Linux(registered trademark).
[0019] The print application 22 is a program that, for example, receives user instructions via the user interface 13 and, based on the received instructions, has the function of causing the PC 1 to edit the image to be printed and send a print command to the label printer 3. The print application 22 is an example of a "program".
[0020] Database 23 is a tabular database consisting of rows and columns, and it stores multiple data entries. Database 23 is a file created by the user and is not stored in memory 12 when PC1 is shipped from the factory. Multiple instances of database 23 may be stored in memory 12. Details of the printing application 22 and database 23 will be described later.
[0021] <Outline configuration of label printer 3> The label printer 3 in this configuration has at least a printing function and a communication function. The label printer 3 is equipped with a main unit operation panel 3a. The main unit operation panel 3a is equipped with an operation section that accepts various operations such as setting print settings, selecting data such as templates, and issuing a print command to execute printing. The main unit operation panel 3a may also be equipped with a display section that displays data. The printing method of the label printer 3 is, for example, a thermal transfer method, an inkjet method, or an electrophotographic method. When the label printer 3 receives a print command and label data to be printed from an external device such as a PC 1 via the communication function, it executes printing based on the label data to create a label.
[0022] The label printer 3, for example, can accommodate a roll of label paper and has the function of printing an image on the label paper to create a label. The roll of label paper is a printing medium in which label paper is layered on a continuous strip of release paper and wound up. The label paper may be a continuous long tape or a die-cut label that has been cut into a predetermined shape in advance. Furthermore, the label printer 3 in this embodiment may also have the function of cutting off and ejecting the printed portion after printing.
[0023] <Procedure for printing using a database> Next, the procedure for printing using the database will be explained with reference to the sequence diagram in Figure 2. The procedures and processing steps of each program described below basically represent the processing of the CPU 11 according to the instructions written in each program. That is, processes such as "judgment," "decision," "acquisition," and "reception" in the following explanation represent the processing of the CPU 11. The processing by the CPU 11 also includes hardware control using the OS 21 API. In this specification, the description of OS 21 is omitted when explaining the operation of each program. Also, "acquisition" is used as a concept that does not necessarily require a request.
[0024] This form of print application 22 can perform database printing based on a database file containing text data. In database printing, the print application 22 accepts the specification of the database to be printed, the specification of the text objects to be placed in the label data, and instructions to associate the specified database with the text objects. A text object is an object that contains a string.
[0025] When the printing application 22 receives a command to execute database printing, it creates label data by writing the text data contained in the specified database into placed text objects, and then instructs the label printer 3 to print based on the created label data. The printing application 22 sequentially creates label data for each piece of text data contained in the database, writing each piece of text data into a text object, and passes these to the label printer 3, thereby causing the label printer 3 to create multiple labels, each printed with the text data from the database.
[0026] The printing application 22 in this configuration can further generate label data with multiple text objects using database printing. For example, the printing application 22 can register rows (records) with multiple columns (fields) defined, and when it receives a database file containing text data in each column, it can associate one text object with each column defined in that database file. In this case, the printing application 22 generates label data for each row by writing the text data corresponding to each column to the text object associated with that column for each row of the database file. The printing application 22 can create multiple labels with multiple text data printed on them by sequentially creating label data for each row in the database file and passing it to the label printer 3.
[0027] Furthermore, the print application 22 in this form can generate label data containing multiple date and time objects. A date and time object is an object that indicates a date or time. The print application 22 can accept the specification of a numerical value indicating the date or time to be written to the date and time object. In addition, if a print command is issued, for example, the date and time of that print command will be written to the date and time object. The print application 22 can also link database columns and date and time objects on a one-to-one basis, and write the date and time calculated based on the column data to the date and time object, thereby creating label data with different dates and times for each row. The print application 22 can create label data by writing the date and time calculated based on the time of printing to the date and time object.
[0028] The following describes the procedure by which the printing application 22 first causes PC1 to calculate the date and time based on the database data, and then generates label data by writing the calculated date and time to a date and time object and printing it.
[0029] <Database creation process> As shown in Figure 2, for example, a user who wants to create a label that includes a date and time creates a database 23 to store the data to be printed (S01) and stores it on PC1 (S02). For example, the database 23 shown in Figure 3 is a database in which text data, which are strings to be printed on the label, are arranged separated by commas and line breaks. The user creating the label determines the strings that represent the text data and creates a database 23 to store each string as text data.
[0030] The file storing database 23 is, for example, a CSV (comma-separated values) file or an Excel file (Excel is a registered trademark). That is, database 23 in this embodiment is a so-called relational database or a similar database, and includes tabular tables. The user may create database 23 using a table creation application program or the like, or create it as a text file containing text that represents the data. The user may create database 23 on PC1, or create it on another device and store it on PC1.
[0031] The database 23 illustrated in Figure 3 stores text data in the first row 231a indicating the title of the text data contained in each column. The database 23 stores text data set for each product (sashimi, bread, eggs, fresh confectionery) in rows 231b, 231c, 231d, and 231e from the second row onwards. In this configuration, the first row 231a is excluded from printing, while rows 231b, 231c, 231d, and 231e are included in the printing. Printing can be done for all rows or selected rows. Each column 232a, 232b, and 232c of the database 23 stores one piece of text data each, indicating the code, name, and expiration date entered via user IF13. The code corresponds to the product code, and the name corresponds to the product name.
[0032] <Label editing process> As shown in Figure 2, after the printing application 22 stores the database 23 in memory 12, it is launched in response to an operation by user IF13 (S11), and then displays the label editing screen on user IF13's display 13a (S12). The label editing screen 50 is an example of an "editing screen". S12 is an example of a "display process" and a "display step". PC1 can accept operations on the displayed label editing screen 50 via the user IF13's mouse 13b or keyboard 13c.
[0033] The label editing screen 50, as shown in Figure 4 for example, is a screen that includes a printer selection field 51, a label display area 59, and buttons for receiving various instructions. The printer selection field 51 allows the user to select a label printer to print the labels. The label display area 59 is an area that displays a print image of the label to be printed. The print button 55 is a button that accepts a print command. The transfer button 56 is a button that accepts a transfer command. The database button 58 is a button that accepts an instruction to specify a file that stores the database to be printed from the files stored on PC1.
[0034] The database display area (hereinafter referred to as the "DB display area") 61, which is located below the label display area 59, is an area that displays the contents of the database. It is displayed when the database button 58 is operated and a database is specified, and is not displayed when no database is specified, i.e., when the database button 58 is not operated.
[0035] The user generates the label data for the label to be printed on the label editing screen 50. To do this, the user arranges objects in the label area LA on the label editing screen 50 to represent the desired label configuration (S15). The print application 22 provides multiple types of objects that can be placed in the label display area 59, including text, frames, images, barcodes, and date / time. A user who wants to create a label that includes a date / time can use the mouse 13b to operate the date / time object selection button from the object selection button group 53 to place the date / time object in the label area LA. Note that one or more objects may be placed in the label area LA. Also, when placing multiple objects in the label area LA, the types of objects may be the same or different.
[0036] When at least one of the following objects—a text object, a date and time object, and a barcode object—is placed in the label area LA of the printing application 22, the database button 58 is displayed in an operable state on the label editing screen 50, and the application becomes capable of accepting instructions to print the database.
[0037] As shown in Figure 2, the user operates the database button 58 to specify database 23 (S16). S16 is an example of a "specification process" or "specification step". When the database button 58 is operated, the print application 22 displays a list of databases stored in memory 12 for selection and can accept database specification via the user IF 13. For example, when database 23, shown in Figure 3, is specified, the print application 22 reads the specified database 23 from memory 12 (S17) and displays a tabular image of database 23 in the DB display area 61, as shown in Figure 4 (S19).
[0038] The label editing screen 50 shown in Figure 4 has an object setting area 52 to the right of the label display area 59. In the label display area 59, one of the objects placed in the label area LA can be selected as the editing target. The object setting area 52 displays the setting items of the object selected in the label display area 59 and can accept setting values. The display content of the object setting area 52 is switched according to the object selected in the label display area 59.
[0039] Figure 4 shows an example of the display when the date and time object OB1 is selected. When a date and time object is selected, the object setting area 52 includes, for example, a type setting field 52a, a format setting field 52b, a print checkbox 52c, a reference date and time specification field 52d, and a date and time calculation setting area 52f.
[0040] The type setting field 52a specifies the type of content to be included in the date and time object. The content type can be either date (year / month / day) or time (hour:minute:second). The formatting setting field 52b specifies the format of the content. The print checkbox 52c allows you to choose whether or not to use the date and time specified in the print command as the reference time for the date and time included in the date and time object.
[0041] As shown in Figure 2, the print application 22 selects the reference time for the date and time to be included in the date and time object via the print checkbox 52c displayed in the user IF13 (S21). As shown in Figure 4, if the print checkbox 52c is not checked via the user IF13, the date and time of the print instruction is not selected as the reference time, and the date and time specified in the reference date and time specification field 52d is selected as the reference time. If the print checkbox 52c is not checked, the print application 22 disables the date and time calculation setting area 52f. Disabling methods include, for example, hiding or graying it out.
[0042] On the other hand, the print application 22, using user IF13, selects the date and time the print command was issued as the reference time if the print checkbox 52c is checked (S22). As shown in Figure 5, when the date and time the print command was issued is selected as the reference time, the print application 22 enables the date and time calculation setting area 52f in user IF13 (S23). When the date and time the print command was issued is selected, the reference date and time specification field 52d is disabled.
[0043] The date and time calculation setting area 52f is an area that accepts settings for items related to date and time calculations. The date and time calculation setting area 52f includes, for example, an addition input method selection field 52g, a numerical input field 52h, a unit selection field 52i, and a calculation method selection field 52j, as shown in Figure 5.
[0044] In the addition input method selection field 52g, you can select how to input the numerical value used in the date and time calculation, that is, the numerical value to be added (addition time). The addition input method selection field 52g includes the following options: "Specify numerical value", "Database field", and "No calculation". "Specify numerical value" is an option that uses a fixed value for the addition time. "Database field" is an option that uses data from a column that makes up the database for the addition time. "No calculation" is an option that does not perform date and time calculations.
[0045] As shown in Figure 2, the print application 22 accepts the selection of an addition input method via the addition input method selection field 52g (S24). S24 is an example of the "method selection process". For example, as shown in Figure 5, when "specify a number" is selected in the addition input method selection field 52g via the user IF13 (alt:specify a number in Figure 2), the print application 22 displays the number input field 52h in the date and time calculation setting area 52f. The print application 22 accepts the input of a number to be added via the number input field 52h (S26 in Figure 2). S26 is an example of the "number input process". "Specify a number" selectable in the addition input method selection field 52g is an example of the "second option".
[0046] When "Specify a numerical value" is selected in the addition input method specification field 52g of the print application 22, the addition direction selection field 52j is enabled and displayed in the date and time calculation setting area 52f. The print application 22 accepts the selection of the direction in which to add a numerical value to the date and time when the print command is issued via the addition direction selection field 52j (S27, S28).
[0047] In contrast, as shown in Figure 6, when "Database Field" is selected in the addition input method selection field 52g via user IF13 (alt:Database Field in Figure 2), the print application 22 displays the database field specification field 52k in the date and time calculation setting area 52f. The database field specification field 52k displays the titles of each column stored in the first row 231a of the database 23 displayed in the DB display area 61, which can be selected. The "Database Field" selectable in the addition input method selection field 52g is an example of the "first option".
[0048] As shown in Figure 2, the print application 22 accepts an operation to associate one of the date and time objects placed in the label display area 59 with one of the columns that make up the specified database 23 (S31). Specifically, when the date and time object OB1 is selected and "Expiration Date" is selected from the database field specification field 52k via user IF13, the print application 22 accepts the selection of the date and time object OB1 and the selection of the column 232c corresponding to "Expiration Date" (S32). S32 is an example of an "object selection process," "object selection step," "column selection process," and "column selection step."
[0049] The print application 22 associates the selected date and time object OB1 with the selected column 232c (S33).
[0050] The print application 22 further accepts the selection of units for date and time calculations via the unit selection field 52i displayed in the date and time calculation setting area 52f (S35, S36). Selectable units include, for example, weeks, days, hours, minutes, and seconds. S36 is an example of the "unit selection process". Note that if "database field" is selected in the addition input method specification field 52g, the print application 22 disables the addition direction selection field 52j and does not accept the selection of the addition direction.
[0051] The print application 22 displays the date and time in the selected date and time object OB1 based on the settings in the object setting area 52 (S40). In addition, as shown in Figure 7, the print application 22 can place text objects OB2, OB3, and OB4 in the label area LA and edit the labels. For example, the text object OB3 is associated with column 232b, which shows the "name" of the specified database 23.
[0052] As shown in Figure 2, when a user wants to print an edited label to the label printer 3, they use the user IF 13 to operate the print button 55 on the label editing screen 50 (S41). When the print application 22 receives a print command in response to the operation of the print button 55, it displays the print settings screen (S42). The print application 22 then performs a calculation process to calculate the date and time based on the data in the selected column for each row of the database 23 specified when creating the template to be printed (S43). S43 is an example of a "calculation step".
[0053] The calculation process will be explained with reference to Figure 8. The CPU 11 of PC1 executes the calculation process shown in Figure 8 using the print application 22. The CPU 11 determines whether or not the document contains a date and time object that requires date and time calculation (S100). For example, if the label to be printed does not contain a date and time object, or if the label to be printed contains a date and time object but the print checkbox 52c is not checked and the reference time of the date and time object is the date and time specified in the reference date and time specification field 52d, the CPU 11 determines that there is no need to perform a date and time calculation. If there is no need to perform a date and time calculation (S100: NO), the CPU 11 terminates the calculation process.
[0054] On the other hand, if the print checkbox 52c is checked and there is a date and time object for which the date and time calculation setting area 52f has been set, the CPU 11 determines that the label to be printed contains a date and time object that needs to be calculated. If the CPU 11 contains a date and time object that needs to be calculated (S100), it reads the unit selected in the unit selection field 52i of the label editing screen 50 (S101). In this configuration, "day" is selected in the unit selection field 52i.
[0055] After reading the units, CPU 11 determines the addition input method (S102). If the addition input method is "numerical specification" (S102: numerical specification), CPU 11 reads the fixed value entered in the numerical input field 52h on the label editing screen 50 (S131). CPU 11 confirms the addition method selected in the addition direction selection field 52j on the label editing screen 50 (S133).
[0056] If "Forward" is selected in the addition direction selection field 52j, CPU 11 determines that the addition direction is forward. If the addition method is forward (S133: Forward), CPU 11 subtracts the fixed value read in S131 from the date and time of the print instruction, according to the unit read in S101 (S135).
[0057] On the other hand, if "backward" is selected in the addition direction selection field 52j on the label editing screen 50, the CPU 11 determines that the addition direction is backward. If the addition method is backward (S133: backward), the CPU 11 adds the fixed value read in S131 to the date and time when the print instruction was given, according to the unit read in S101 (S139). The CPU 11 stores the calculation result of S135 or S139 in the memory 12 (S137) and terminates the calculation process.
[0058] Therefore, when the print application 22 checks the print checkbox 52c during template creation, and the reference time for the date and time to be printed in the date and time object is set to the date and time when the print instruction was given, if the addition input method is specified as a number, only one calculation result is stored in memory 12.
[0059] On the other hand, if "Database field" is selected in the addition input method selection field 52g, the CPU 11 determines that the addition input method is a database field (S102: Database field).
[0060] If the addition input method is a database field, CPU11 extracts one row to be printed from the specified database (S111), and retrieves the data from the column in the extracted row that is associated with the datetime object (S113). For example, CPU11 retrieves the string "1" from column 232c of row 231b in database 23.
[0061] CPU11 identifies the addition time from the string shown in the acquired data (S115). The method for identifying integer values including positive and negative signs from the database data will be explained with reference to Figure 9. Figure 9 shows an example of a specific pattern.
[0062] The printing application 22 checks the strings that make up the data obtained from the database 23, starting from the first character, to determine whether each character is a valid integer value including positive or negative signs. If the printing application 22 finds a character that is not a valid integer value including positive or negative signs, it determines the addition time based on the string up to the character immediately preceding the found character.
[0063] For example, in a database column, strings consisting only of characters that can be expressed as integer values including positive and negative signs, such as "34" and "-34", are identified as the numerical values (addition time) to be added.
[0064] For strings like "3z4" and "-34u7" shown in the database columns, where a character that can be an integer (including positive and negative signs) is followed by a character that cannot be an integer (including positive and negative signs), the strings "3" and "-34" up to the character immediately preceding the non-integer character "z" and "u" are identified as the summation time.
[0065] For example, a string of characters that does not form an integer value including positive or negative signs, such as the data "Today" shown in a database column, is assigned "0" as the addition time because the numerical value is not determined.
[0066] For example, in a database column, a string whose first character is not a valid integer value (including positive and negative signs), such as the data "a34", will have "0" as its addition time. Similarly, in a database column, a string whose second character is not a valid integer value, even if the first character is a positive or negative sign, such as the data "-a34", will have "0" as its addition time.
[0067] For example, if a column in the database is blank, "0" is identified as the added time.
[0068] For example, in a database column, if a string contains a space before an integer value that includes positive or negative signs, such as "○34" (where ○ represents a space), the space is trimmed and "34" is identified as the added time. For example, a full-width number, such as "34" in a database column, is treated as a half-width number "34". For example, if the data in a database column is a string consisting only of spaces, "0" is identified as the added time.
[0069] The printing application 22 may allow setting upper and lower limits for integer values that include positive and negative signs. For example, if the upper limit for integer values that include positive and negative signs is set to "9999", and the data shown in the database column consists of the string "23456", which exceeds that upper limit, then the upper limit "9999" is identified as the addition time. On the other hand, for example, if the lower limit for integer values that include positive and negative signs is set to "-9999", and the data shown in the database column consists of the string "-23456", which is less than that lower limit, then the lower limit "-9999" is identified as the addition time. Note that if the numerical value shown in the database column exceeds the upper limit or falls below the lower limit, the printing application 22 may identify "0" as the addition time, or it may identify a numerical value within the range that can be recognized as a numerical value as the addition time.
[0070] The printing application 22 may set a limit for truncating fractions. For example, if the data shown in the database column is a string containing fractions, such as "4.7", then "4" is identified as the added time.
[0071] These identification methods are merely examples and are not limited to them. For example, the string in the specified column 232c may include a unit of time to be added (weeks, days, hours, minutes, seconds) or a specification of the direction of addition (before, after), such as "10 days" or "10 days later". If the string in the specified column 232c contains a unit of time to be added or a specification of the direction of addition, the print application 22 may disable the unit selection field 52i and the addition direction selection field 52j, and S35 and S36 in Figure 2 may not be executed. However, by displaying the unit selection field 52i and the addition direction selection field 52j to the user IF13 and allowing the user to select the unit of time to be added, the print application 22 increases the flexibility of the numerical values that can be written to column 232c of the database 23.
[0072] Returning to Figure 8, once the CPU 11 identifies the addition time, it adds the addition time identified in S115 to the date and time when the print button 55 was operated, i.e., the date and time when the print instruction was given, according to the unit read in S101 (S117). For example, if the CPU 11 extracts row 231b, the second row from the specified database 23, and obtains "1" stored in the specified column 232c from the extracted row 231b, then "1" is identified as the addition time. If the print button 55 is operated on "December 12, 2024" and the unit is set to "day" in the unit selection field 52i, the CPU 11 calculates "December 13, 2024" (by adding "1 day" to "December 12, 2024") as the date and time to include in the date and time object OB1.
[0073] Furthermore, if the addition time identified based on the data in column 232c is a negative number, CPU 11 adds the negative number to the date and time the print command was issued. In other words, the absolute value of the negative number is added before the date and time the print command was issued. Effectively, the absolute value of the negative number is subtracted from the date and time the print command was issued. That is, if the numerical value indicated by the data in column 232c is a positive number, CPU 11 adds the absolute value of that number after the time the print command was issued, and if the numerical value indicated by the data in column 232c is a negative number, CPU 11 adds the absolute value of that number after the time the print command was issued (effectively subtracting it).
[0074] CPU 11 associates the calculation result "December 13, 2024" with row 231b extracted in S111 and stores it in memory 12 (S119). CPU 11 determines whether the date and time calculation is complete or not (S121). CPU 11 determines that the date and time calculation is not complete if there are rows 231c, 231d, and 231e for which the date and time calculation has not been completed. If the date and time calculation is not completed for all rows to be printed (S121: NO), CPU 11 returns to S111 and performs the date and time calculation for the next row. By repeating S111 to S119, CPU 11 calculates the date and time for each row 231c, 231d, and 231e based on the data stored in column 232c.
[0075] Specifically, CPU 11 calculates the date and time "December 15, 2024" by adding "3 days," determined based on the numerical value "3" stored in column 232c of row 231c and the unit "day" selected in the unit selection field 52i, to the end of the date and time "December 12, 2012" when the print command was issued, and stores the calculated date and time associated with row 231c. Furthermore, CPU 11 calculates the date and time "December 19, 2024" by adding "7 days," determined based on the numerical value "7" stored in column 232c of row 231d and the unit "day" selected in the unit selection field 52i, to the end of the date and time "December 12, 2012" when the print command was issued, and stores the calculated date and time associated with row 231d. Furthermore, CPU 11 determines the added time to be "0 days" based on the numerical value "Today" stored in column 232c of row 231e and the unit "Day" selected in the unit selection field 52i. In this case, CPU 11 calculates the date and time of the print instruction, "December 12, 2024" (effectively without calculating the date and time, but simply the date and time of the print instruction) and stores it in association with row 231e.
[0076] CPU 11 terminates the calculation process when it has finished calculating the date and time for all rows to be printed (S121:YES). Therefore, when the print application 22 checks the print checkbox 52c when creating the template, and the reference time for the date and time to be printed in the date and time object is set to the date and time when the print instruction was given, if the addition input method is a database field, different calculation results will be calculated for each row 231b, 231c, 231d, 231e depending on the data in the column, and stored in memory 12.
[0077] As shown in Figure 2, the print application 22 generates label data after performing calculation processing (S44). S44 is an example of the "generation process" and "generation step". When using database printing, the print application 22 generates label data for each row 231b, 231c, 231d, and 231e of the database 23, writing the calculation result associated with each row to the date and time object OB1. The print application 22 also generates label data for each row 231b, 231c, 231d, and 231e of the database 23, writing the data from column 232b, which indicates the "name" of the database 23, to the text object OB3. After generating label data for each row, the print application 22 displays a preview image based on the generated label data on the print settings screen (S45). S45 is an example of the "preview process".
[0078] The print settings screen 80 shown in Figure 10 includes a printer selection field 81, a database print selection field 85, a preview display area 87, a print button 86, and a cancel button 88. The printer selection field 81 accepts the selection of the printer to be used for printing. The database print selection field 85 is displayed when printing labels using a database and accepts the selection of rows to be printed from the specified database. When "All" is selected in the database print selection field 85, the print application 22 can print all rows registered in the specified database. When "Selected Records" or "Range Selection" is selected in the database print selection field 85, the print application 22 can print selected rows.
[0079] The preview display area 87 displays a preview image of the label data to be printed on the selected label printer 3. For example, the preview display area 87 displays a preview image based on the label data generated in S44. Figure 10 shows an example of the display when all rows are to be printed. The print settings screen 80 is an example of the "preview screen". Preview images 91b, 91c, 91d, and 91e display the date and time 92b, 92c, 92d, and 92e calculated based on the data in column 232c for each row 231b, 231c, 231d, and 231e of the database 23. Therefore, the date and time 92b, 92c, 92d, and 92e are different for each piece of label data. If the user wants to print, they operate the print button 86 using user IF13. On the other hand, if the user does not want to print, they operate the cancel button 88.
[0080] As shown in Figure 2, when the print application 22 receives a print execution command in response to the operation of the print button 86 (S51), it sends a print job containing the label data generated in S44 to the label printer 3 (S52). S52 is an example of a "print process" and a "print step". When the label printer 3 receives the print job, it prints the label data contained in the print job as is (S53), and can create labels with different dates and times printed on them.
[0081] <Forward Printing> Next, we will explain the process by which the printing application 22 transfers template data and database to the label printer 3, and the label printer 3 calculates the date and time based on the template file and database transferred by the printing application 22, generates label data with the calculated date and time written to it, and prints it.
[0082] The print application 22 creates the database and template to be transferred. The creation of the database and template is the same as in steps S01 to S40 in Figure 2, so the explanation is omitted.
[0083] If a user wants to send a created template to the label printer 3, they operate the transfer button 56 on the label editing screen 50, as shown in Figure 7. As shown in Figure 11A, when the print application 22 receives a transfer instruction in response to the operation of the transfer button 56 (S201), it transfers the template data, which includes the date and time object selected on the label editing screen 50, column information indicating the selected column, and the specified database to the label printer 3 (S203). S203 is an example of a "transfer process" and a "transfer step".
[0084] The print application 22 transfers template data of template T, which contains the date / time object OB1 and text objects OB2, OB3, and OB4, to the label printer 3, as shown in Figure 11B, for example. The template data includes column information indicating column 232c, which was specified when editing the date / time object OB1. Furthermore, the print application 22 transfers the database 23, which was specified when editing the date / time object OB1, to the label printer 3. Note that the date / time object OB1 and text object OB3 included in the template data do not contain text data based on the data in the specified columns 232c and 232b, but rather sample data "YYYY / MM / DD" and "NAME" are written to them.
[0085] When the label printer 3 receives template data and database 23, it saves the template data and database 23 to a memory area accessible to the label printer 3 (S204). The storage location may be the label printer 3's internal memory or an external device such as a server.
[0086] When the label printer 3 receives a print command from the main unit using the main unit control panel 3a, with template T selected, it reads the template data and database 23 from their storage location (S212). S212 is an example of a "read step".
[0087] The label printer 3 performs calculation processing (S213) based on the data registered in each row 231b, 231c, 231d, and 231e of the database 23 to calculate the date and time to be written to the date and time object OB1. The calculation processing in S213 is performed according to the calculation processing shown in Figure 8, similar to S43 in Figure 2, so the explanation is omitted. S213 is an example of the "main calculation processing" and "main calculation step".
[0088] Label printer 3 writes data from database 23 to the text object OB3 and the datetime object OB1 of template T, generating label data (S214). For example, for each row 231b, 231c, 231d, 231e of database 23, label printer 3 writes the calculation result calculated in S213 to the datetime object OB1 of template T, generating label data. The generation of label data in S214 is the same as S44 in Figure 2, so the explanation is omitted.
[0089] Label printer 3 generates label data for each row 231b, 231c, 231d, and 231e registered in database 23, and then prints based on the generated label data (S215). In other words, label printer 3 generates and prints label data in which the date and time calculated by label printer 3 is written to a date and time object. S215 is an example of the "label printing process" and "label printing step".
[0090] As explained in detail above, PC1, which runs the print application 22 in this form, selects one of the date and time objects OB1 located on the label editing screen 50, specifies the database 23, and selects one of the columns 232c that make up the specified database 23. In response to a print command, PC1 uses the print application 22 to calculate the date and time for each row 231b, 231c, 231d, 231e of the specified database 23 based on the data in the selected column 232c. PC1 then uses the print application 22 to generate and print label data in which the calculated date and time is written to the selected date and time object OB1. In other words, the print application 22 in this form calculates the date and time for each row 231b, 231c, 231d, 231e of the database 23 based on the data in the selected column 232c. As a result, the date and time shown in the date and time object OB1, which is generated by the printing process based on each row 231b, 231c, 231d, and 231e, will be calculated based on the data in any column 232c. This means that, without having to separate the database for each number (addition time) added to the date and time specified in the print command, it is possible to print different calculated dates and times for each row 231b, 231c, 231d, and 231e using a single database 23.
[0091] Furthermore, if the printing application 22 accepts a setting to use the date and time of the print instruction as the basis for date and time calculation, it will calculate the date and time to print on each label based on the date and time of the print instruction. This allows the printing application 22 to calculate the date and time to print based on the same time, even when printing a large number of labels.
[0092] Furthermore, in this form of printing system 100, PC1 selects one of the date and time objects placed on the editing screen using the printing application 22, specifies the database 23, and selects one of the columns that make up the specified database. Upon receiving a transfer command, PC1 executes a transfer process to transfer the template data of template T, which includes the date and time object OB1 and column information, and the database 23 specified when the template was created, to the label printer 3. The label printer 3 saves the template data and the database. Upon receiving a main print command, the label printer 3 reads the saved template data and the database and calculates the date and time based on the data in the selected column 232c for each row 231b, 231c, 231d, 231e of the database 23. For each row 231b, 231c, 231d, 231e of the database 23, the label printer 3 generates label data in which the calculated date and time is written to the date and time object OB1 included in the template data, and then executes a main print process to print it. As a result, the date and time shown in the date and time object OB1, which is generated by the main print process based on each row 231b, 231c, 231d, and 231e of database 23, will be calculated based on the data in any column 232c. This means that even without separating the database for each number (addition time) added to the date and time for which a print command was issued, it is possible to print different calculated dates and times for each row 231b, 231c, 231d, and 231e using a single database 23.
[0093] Furthermore, in this configuration of the printing system 10, if the printing application 22 installed on PC1 accepts a setting to use the date and time of the print command as the basis for date and time calculation, the label printer 3 calculates the date and time to be printed on each label based on the date and time of the print command issued by the main unit. As a result, the label printer 3 can calculate the date and time to be printed based on the same time, even when printing a large number of labels.
[0094] This embodiment is merely illustrative and does not limit the present invention in any way. Therefore, the present invention can naturally be improved and modified in various ways without departing from its essence. For example, the printing medium of the label printer is not limited to roll-shaped label paper, but may also be fanfold paper or cut-sheet-shaped label paper.
[0095] Furthermore, the configurations of each display screen illustrated in the attached diagrams are not limited to the illustrated examples and can be changed as appropriate. For example, the arrangement and shape of each button are not limited to the illustrated examples. For instance, labels may include not only text and date / time information but also graphics.
[0096] For example, the database print specification field 85 can be omitted, and the application does not accept the specification of the items to be printed. However, the print application 22 allows the user to specify the rows to be printed from the database 23, making it user-friendly as the user can specify and print any row in the database 23.
[0097] For example, the print application 22 may choose not to set negative numbers in the data of column 232c selected in the database field specification field 52k. In this case, the application may determine the direction of addition when adding a number to the date and time when a print command is issued, based on the data in column 232c and the setting value selected in the addition direction selection field 52j. However, the print application 22 can also specify the direction of addition for each row based on column 232c by determining the addition direction based on whether the number based on the data in column 232c is positive or negative.
[0098] For example, in S115 of Figure 8, if the string represented by the data in the column contains characters other than integer values indicating positive or negative signs, the addition time does not need to be determined by the characters before the non-numeric part, such as setting the addition time to "0". However, if the string is an integer value from the beginning to a certain point, the printing application 22 can estimate the addition time using the integer value up to that point, which increases the flexibility of the numerical values written to the database 23.
[0099] For example, if there is a space in the data in column 232c, the integer value before the space may be used as the time to be added. Alternatively, if column 232c is blank, a number other than "0" may be specified as the time to be added. However, if the selected column 232c is blank, the printing application 22 prefers to treat the number shown in the data of that column 232c as "0" and, as a result, not add time, since the number cannot be determined. Furthermore, by treating blanks as "0", it is possible to set rows in the database 23 that do not have time added, that is, rows that print the date and time of the print instruction as is.
[0100] For example, if the numerical value shown in the data in column 232c exceeds the upper limit of the addition time or falls below the lower limit, the date and time calculation does not need to be performed based on the upper or lower limit. However, the print application 22 can avoid printing inappropriate times by treating the upper limit as the addition time if the numerical value shown in the data in column 232c exceeds the upper limit, and by treating the lower limit as the addition time if the numerical value falls below the lower limit.
[0101] For example, if the basis for date and time calculation is set to the date and time when the print instruction was issued, it is not necessary to select numerical specification as the method of addition. However, the print application 22 provides a second option (numerical specification) for calculation using a fixed value, in addition to the first option (database field) which uses the database 23 as the method of addition, thereby increasing the flexibility of the date and time written to the date and time object. In other words, if the first option is selected, the print application 22 can set the date and time to be printed on each label to a different date and time depending on the data in column 232c, and if the second option is selected, it can set the date and time to be printed on each label to the same date and time.
[0102] For example, the numeric input field 52h and the database field specification field 52k may always be displayed when a date / time object is selected, and do not need to be switched depending on the selection in the addition input method selection field 52g. However, if "Database Field" is selected in the addition input method selection field 52g, the print application 22 will not display the numeric input field 52h, but will display the database field specification field 52k, thereby restricting the input of fixed values. On the other hand, if "Numeric Specification" is selected in the addition input method selection field 52g, the numeric input field 52h will be displayed, but the database field specification field 52k will not be displayed, thereby restricting the specification of columns and avoiding the selection or specification of unused items, thus saving the user effort.
[0103] For example, if a print command is issued, the preview images 91b, 91c, 91d, and 91e of the label data, in which the calculation results are written to the date and time object OB1 for each row, do not need to be displayed. However, the print application 22 displays a print image of the label data reflecting the calculation results for each row 231b, 231c, 231d, and 231e of the database 23 to the user IF13, making it easier for the user to confirm whether the correct date and time are written to the label data.
[0104] Furthermore, in any flowchart disclosed in the embodiments, the execution order of any multiple processes in any multiple steps can be arbitrarily changed or executed in parallel, as long as no inconsistencies arise in the processing content.
[0105] Furthermore, the processes disclosed in the embodiments may be executed by a single CPU, multiple CPUs, hardware such as an ASIC, or a combination thereof. Also, the processes disclosed in the embodiments can be implemented in various forms, such as a recording medium or method that stores a program for executing the process. [Explanation of Symbols]
[0106] 1 PC 3. Label printer 11 CPU 13 User Interface 22 Printing Apps 23 Databases 100 Printing Systems
Claims
1. A program that is executable by an information processing device and has a label editing function, The aforementioned information processing device, A display process that displays an editing screen that accepts label editing and allows at least one date and time object indicating a date or time to be placed on the user interface of the information processing device, A specification process that specifies a tabular database consisting of rows and columns, An object selection process to select one of the date and time objects placed on the editing screen, A column selection process to select one of the columns constituting the database specified in the above-mentioned specification process, It is possible to make it run, The aforementioned information processing device further includes: In response to a print command, for each row constituting the database specified in the specified process, A calculation process that calculates the date and time based on the data in the column selected in the column selection process, A generation process that generates label data by writing the date and time calculated in the calculation process to the date and time object selected in the object selection process, A printing process that causes a label printer connected to the information processing device to print based on the label data generated in the generation process, To execute A program configured in such a way.
2. A program according to claim 1, In the aforementioned calculation process, On the date and time when the print instruction was given, calculate the date and time by adding the numerical value shown in the data of the column selected in the column selection process. A program configured in such a way.
3. A program according to claim 2, The aforementioned information processing device, It is possible to execute a unit selection process to select the unit of addition time to be used in the calculation process. In the aforementioned calculation process, At the date and time the print instruction was given, the date and time obtained by adding the numerical value shown in the data of the column selected in the column selection process, based on the unit selected in the unit selection process, is calculated. A program configured in such a way.
4. A program according to claim 2, In the aforementioned calculation process, If the numerical value shown in the data of the column selected in the column selection process is a positive number, then calculate the date and time by adding the absolute value of the numerical value to the date and time when the print instruction was given. If the numerical value shown in the data of the column selected in the column selection process is negative, calculate the date and time by adding the absolute value of the numerical value to the date and time when the print instruction was given. A program configured in such a way.
5. A program according to claim 2, In the aforementioned calculation process, The strings shown in the data of the column selected in the column selection process are determined, starting from the beginning, to determine whether they are characters that can be expressed as integer values including positive and negative signs. If any characters are determined not to be characters that can be expressed as integer values, the numerical values are identified based on the characters that have been determined to be characters that can be expressed as integer values up to that point, and the date and time obtained by adding the identified numerical values is calculated. A program configured in such a way.
6. A program according to claim 2, In the aforementioned calculation process, If the column selected in the column selection process is blank, the numerical value shown in the data of the column selected in the column selection process is set to 0, and the date and time are calculated accordingly. A program configured in such a way.
7. A program according to claim 2, In the aforementioned calculation process, If the numerical value shown in the data of the column selected in the column selection process exceeds the upper limit, the date and time are calculated using the numerical value as the upper limit. A program configured in such a way.
8. A program according to claim 1, The aforementioned information processing device, It is possible to execute a method selection process to select an addition input method, and the options that can be selected in the method selection process include a first option and a second option. If the first option is selected in the method selection process, The column selection process described above is executed, If the second option is selected in the method selection process, The system executes a numerical input process that accepts the input of a number to be added, Furthermore, in response to the print instruction, the information processing device shall If the first option is selected in the method selection process, For each row constituting the database specified in the above-mentioned processing, the calculation process, the generation process, and the printing process are executed. If the second option is selected in the method selection process, The process involves calculating a date and time by adding the numerical values entered in the numerical input process at the date and time when the print instruction was given, generating label data by writing the calculated date and time to the date and time object selected in the object selection process, and then having the label printer connected to the information processing device perform printing based on the generated label data. A program configured in such a way.
9. A program according to claim 8, The aforementioned information processing device, If the second option is selected in the method selection process, the column selection process will not be executed. If the first option is selected in the method selection process, the numerical input process is not executed. A program configured in such a way.
10. A program according to claim 1, The aforementioned information processing device, After the print command is received, for each row constituting the database specified in the specified process, a preview process is executed to display a preview screen on the user interface of the information processing device that shows a print image of the label data generated in the generation process, before executing the print process. A program configured in such a way.
11. A printing system comprising a program installed on an information processing device and a label printer capable of communicating with the information processing device, The program is configured on the information processing device. A display process that displays an editing screen that accepts label editing and allows at least one date and time object indicating a date or time to be placed on the user interface of the information processing device, A specification process that specifies a tabular database consisting of rows and columns, An object selection process to select one of the date and time objects placed on the editing screen, A column selection process to select one of the columns constituting the database specified in the above-mentioned specification process, It is possible to make it run, The aforementioned information processing device further includes: In response to a transfer instruction, it is possible to execute a transfer process that transfers template data, including the date and time object selected in the object selection process and column information indicating the column selected in the column selection process, and the database specified in the specification process, to the label printer. The aforementioned label printer is The template data and the database transferred from the information processing device can be stored. The aforementioned label printer further, In response to a print command for the template data, the template data and the database are read, and for each row constituting the read database, A main calculation process that calculates the date and time based on the data in the column information contained in the template data that was read out, A label printing process that generates label data by writing the date and time calculated in the main calculation process to the date and time object included in the read template data, and prints based on the generated label data, Execute A printing system configured as follows.
12. A printing system according to claim 11, The aforementioned printer is In the main unit calculation process, the date and time obtained by adding the numerical value shown in the column data shown in the column information included in the read template data to the date and time when the main unit print instruction was given, A printing system configured as follows.
13. A method for controlling an information processing device, A display step of displaying an editing screen that accepts label editing and on which at least one date and time object indicating a date or time can be placed, on the user interface of the information processing device, A specification step that specifies a tabular database consisting of rows and columns, An object selection step of selecting one of the date and time objects placed on the editing screen, A column selection step in which one of the columns constituting the database specified in the above-mentioned step is selected, Includes, moreover, In response to a print command, the following steps are performed for each row constituting the database specified in the aforementioned step: A calculation step which calculates the date and time based on the data of the column selected in the column selection step, A generation step that generates label data by writing the date and time calculated in the calculation step to the date and time object selected in the object selection step, A printing step in which a label printer connected to the information processing device performs printing based on the label data generated in the generation step, including, Control method.
14. A control method for an information processing device and a label printer connected to the information processing device, A display step of displaying an editing screen that accepts label editing and on which at least one date and time object indicating a date or time can be placed, on the user interface of the information processing device, The aforementioned information processing device includes a specification step of specifying a tabular database consisting of rows and columns, The information processing device includes an object selection step of selecting one of the date and time objects placed on the editing screen, The information processing device performs a column selection step in which it selects one of the columns constituting the database specified in the specified step, Includes, moreover, A transfer step in which, in response to a transfer instruction, the information processing device transfers template data including the date and time object selected in the object selection process and column information indicating the column selected in the column selection process, and the database specified in the specification process, from the information processing device to the label printer, and the label printer saves the template data and the database transferred from the information processing device. In the label printer, upon receiving a print command for the template data, a reading step is performed to read the template data and the database. Includes, moreover, The following steps are performed for each row that makes up the database read in the aforementioned reading step: A main calculation step that calculates the date and time based on the data of the column indicated in the column information contained in the template data that has been read out, A label printing step which generates label data by writing the date and time calculated in the main calculation step to the date and time object included in the read template data, and prints based on the generated label data, including, Control method.