JP2004062659A - Form processing device, form processing method, storage medium and program - Google Patents

Form processing device, form processing method, storage medium and program Download PDF

Info

Publication number
JP2004062659A
JP2004062659A JP2002221821A JP2002221821A JP2004062659A JP 2004062659 A JP2004062659 A JP 2004062659A JP 2002221821 A JP2002221821 A JP 2002221821A JP 2002221821 A JP2002221821 A JP 2002221821A JP 2004062659 A JP2004062659 A JP 2004062659A
Authority
JP
Japan
Prior art keywords
data
field
character
character string
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002221821A
Other languages
Japanese (ja)
Other versions
JP2004062659A5 (en
Inventor
Keiichi Takashima
高島 敬一
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2002221821A priority Critical patent/JP2004062659A/en
Priority to EP03254640A priority patent/EP1387291A3/en
Priority to US10/627,614 priority patent/US7200811B1/en
Priority to CNB031498469A priority patent/CN1278257C/en
Publication of JP2004062659A publication Critical patent/JP2004062659A/en
Publication of JP2004062659A5 publication Critical patent/JP2004062659A5/ja
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To facilitate an operation of setting field attributes in business form processing of flowing field data in a field in a business form. <P>SOLUTION: A business form processing method flows field data in a field defined in a form. A character string included in set field attribute information, which comprises picture characters showing a format of filed data to be flowed, is picture-analyzed (Step S302). For a flow into a field, a number of repetitions of flowing given field data repeatedly by a plurality of times is checked and expanded as picture characters (Step S303). According to the number of repetitions, the given field data are repeatedly flowed in the field (Step S305). <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、フィールドデータソースに記述されたデータ(以下、「フィールドデータ」と称す)を、帳票内にあらかじめ定義したフィールド(フィールドデータソースのデータを受け取るプログラム中のメモリ領域)に流し込むためのプログラムである帳票処理プログラムに関するものである。
【0002】
【従来の技術】
帳票処理プログラムとは、フィールドデータを、帳票内にあらかじめ定義したフィールドに流し込むためのプログラムであり、該プログラムにより、各フィールドが有するフィールド属性に従ったフィールドデータが流し込まれる。
【0003】
フィールド属性とは、フィールドデータの流し込みにおいて、各フィールドが個別に有する情報のことで、例えば、入力ピクチャとは、フィールドが受け取り可能なフィールドデータの書式を文字列で表したものである。
【0004】
具体的には、入力ピクチャは、フィールドデータの文字数分のピクチャ文字(入力ピクチャの各文字を「ピクチャ文字」と称す)を並べることにより記述され、日付型のフィールドであれば、入力ピクチャは「YYYY/MM/DD」と設定される。
【0005】
【発明が解決しようとする課題】
しかし、従来の方法では、フィールド属性として設定されたフィールドデータの文字数が多い場合、記述する入力ピクチャの文字数も多くなるため、入力ピクチャ設定画面での入力(フィールド属性の設定)が面倒であり、文字数を間違って入力してしまうことがあった。
【0006】
また、フィールドデータの文字数が不定である場合には、フィールドデータを流し込む帳票処理プログラムにおいて、データソースに格納されているフィールドデータを、入力ピクチャの文字数に従って、文字型のフィールドならフィールドデータの後ろにスペースを、数値型のフィールドならフィールドデータの前に0を付加してから(つまり、フィールドデータを加工してから)フィールドに流し込む必要があった。
【0007】
本発明は前述の問題に鑑みてなされたものであり、以下のことを目的とする。
(1)帳票内のフィールドにフィールドデータを流し込む帳票処理において、フィールド属性の設定作業を簡便化することを目的とする。
(2)また、帳票内のフィールドにフィールドデータを流し込む帳票処理において、設定されたフィールド属性にあわせてフィールドデータを加工することなく、フィールドデータの流し込みを可能とすることで、フィールドデータの流し込み作業を簡便化することを目的とする。
(3)さらに、上記課題を解決する帳票処理方法、帳票処理装置、ならびに帳票処理方法をコンピュータによって実現させるためのプログラムを提供することを目的とする。
【0008】
【課題を解決するための手段】
上記の目的を達成するために本発明に係る帳票処理方法は以下のような構成を備える。即ち、
帳票内に定義されたフィールドに流し込むデータを格納しているフィールドデータソースを読み込み、該フィールドデータソースのデータを該帳票内のフィールドに流し込む帳票処理方法であって、
前記各フィールドごとに設定されるフィールド属性情報に含まれる文字列であって、流し込まれるデータの書式を表す文字より構成される文字列を読み込む読込工程と、
フィールドに流し込む際に、所定のデータを複数回繰り返して流し込むための繰り返し数を前記読み込まれた文字列より認識する認識工程と、
前記認識した繰り返し数に基づいて、前記所定のデータを繰り返して前記フィールドに流し込む流込工程とを備える。
【0009】
【発明の実施の形態】
以下、本発明の実施形態を図面を参照して説明する。なお、以下の説明において用いる用語をあらかじめ定義すると、「帳票」とは、枠線、固定的な図形、文字等を有し、定義されたフィールドにフィールドデータを流し込むことが可能なファイルをいうものとする。また、「フィールドデータソース」とは、帳票内に定義されたフィールドに流し込むデータをデータ項目毎にわけて保存されたデータソースファイル(もしくはデータベース)をいうものとする。また、「データ項目」とはフィールドデータの集合を構成する要素をいうものとする。
【0010】
図1は、本発明の実施形態に係る帳票処理装置のシステム構成を示すブロック図である。図2乃至図10は、図1の帳票処理装置におけるデータ処理の流れを示すフローチャートである。
【0011】
図1において、1は中央処理装置、2はRAMなどの記憶装置、3はCRTなどの表示装置、4はキーボード、5はマウス、6は外部補助記憶装置をそれぞれ示す。外部補助記憶装置6は、プログラム等が媒体から帳票処理装置に配給されることを示す。プログラム等が格納される記憶媒体としては、ROM、フロッピー(登録商標)ディスク、CD−ROM、ハードディスク、メモリカード、光磁気ディスクなどを用いることが可能である。図11は、記憶媒体中の帳票処理プログラムの構成を示す。
【0012】
図12は、帳票処理プログラム、フィールドリストおよびフィールドデータが記憶装置2に格納され、プログラムが実行可能となった状態のメモリマップを示す。
【0013】
フィールドリストは、フィールドの順番にフィールドの情報を格納したデータである(図13)。フィールドは各々フィールド属性を持つ。フィールド属性は、フィールドID・フィールド名・フィールド形式・データ型・入力ピクチャなどから構成される。
【0014】
フィールドIDは、プログラム内部でフィールドを識別する一意の数字である。フィールド名は、ユーザがフィールドを識別するための一意の文字列である。
【0015】
フィールド形式は、固定/可変/自動などの値をとる。フィールド形式が固定のフィールド(以下、固定フィールド)は各印刷ページに共通のデータを受け取り、フィールド形式が可変のフィールド(以下、可変フィールド)は各印刷ページ毎に変わるデータを受け取り、フィールド形式が自動のフィールド(以下、自動フィールド)はプログラムが自動的に生成したデータ、例えば、印刷開始時の日時や印刷ページなど、を受け取る。
【0016】
データ型は、受け取るデータの種類を表わし、文字/数値/日付/時間/バーコードなどの値をとる。
【0017】
入力ピクチャは、フィールドが受け取るフィールドデータの書式を示す文字列であり、フィールドはこの書式に従って、流し込むフィールドデータを解釈する。入力ピクチャは、型指定文字・スキップ文字・固定文字・繰り返し文字の4種類のピクチャ文字から構成される。
【0018】
図14は、4種類のピクチャ文字の例を表わしたものである。型指定文字は、対応するフィールドデータの文字をどのように解釈するかを指定するものである。例えば、「9」は数値、「X」は文字、「G」は元号漢字として解釈することを意味する。型指定文字によって解釈できないフィールドデータは、入力ピクチャに従っていないとしてエラーとなる。例えば、「9(数値)」に対して「文字」のフィールドデータ、「G(元号漢字)」に対して「年」のフィールドデータが流し込まれるとエラーとなる。
【0019】
型指定文字はデータ型によって使える文字や組み合わせ・順序などが制限される場合がある。例えば、データ型が日付型の場合、使える型指定文字は「Y」(西暦年)、「M」(月)、「D」(日)、「G(全角文字)」(元号漢字)、「g」(和暦年)であり、「Y」と「G」「g」は組み合わせられず、「G」と「g」は組み合わさなければいけないという制限があったり、同じ型指定文字は、1つの入力ピクチャの中で不連続ではいけないという制限があったりする。このような制限は、入力ピクチャの設定時に行われているものとする。
【0020】
図15はフィールドのデータ型と入力ピクチャを設定する画面の例である。この画面でユーザはデータ型をリストから選択し、入力ピクチャを入力して、OKボタンを押すと、データ型との組み合わせ、型指定文字同士の組み合わせなどをチェックして、不正であるならエラーが表示されて設定はできない。
【0021】
スキップ文字は、対応するフィールドデータの任意の文字を読み飛ばすことを指定するものであり、型指定文字で使われていない文字である。例えば、ピクチャ「YYYY!MM!DD」に対して、「2001/12/13」と「2001%12%13」はどちらも2001年12月13日という意味で解釈される。
【0022】
固定文字は、対応するフィールドデータの特定の文字を読み飛ばすことを指定するものであり、型指定文字とスキップ文字と繰り返し文字以外の文字である。対応するフィールドデータの文字が特定の文字でなければ、フィールドデータが入力ピクチャに従っていないとしてエラーとなる。
【0023】
例えば、入力ピクチャが「YYYY年MM月DD日」と設定されたデータ型が日付型のフィールドに対して、「2001年12月13日」のフィールドデータは流し込めるが、「2001年12年13日」のフィールドデータはエラーとなる。繰り返し文字は、「(n)」(n:0以上の整数)の書式の繰り返し記法で「(」の直前のピクチャ文字をn回繰り返すことを指定する。
【0024】
例えば、「9(10)」は「9999999999」と同等である。繰り返し記法は、型指定文字・スキップ文字・固定文字のいずれのピクチャ文字に対しても有効であるが、入力ピクチャの最初に記述することはできない。繰り返し数が0の場合は、文字数が不定という特別な意味を持ち、不定繰り返し記法という。
【0025】
例えば、入力ピクチャ「9(4)」に対して流し込み可能なフィールドデータは4桁の数値に限られるが、入力ピクチャ「9(0)」に対して流し込み可能なフィールドデータは帳票処理プログラムが扱うことが出来る範囲であれば何桁の数値でもよい。不定繰り返し記法は、1つのフィールドの入力ピクチャにおいて1度しか使えない。複数回の不定繰り返し記法があるとそれぞれのピクチャ文字に流し込むべきフィールドデータの文字数が特定できないからである。
【0026】
例えば、「Y(0)年M(2)月D(2)日」の入力ピクチャは有効であるが、「Y(0)年M(0)月D(2)日」の入力ピクチャは不正である。入力ピクチャの入力画面では、繰り返し記法のチェックも行い、不正であるならエラーが表示されて設定はできない。
【0027】
本実施形態は、複数のフィールドデータを対応するフィールドに順次流し込む一例であり、帳票処理プログラムは図2に示すような手順で処理を行う。
【0028】
まず、データソースから最初のフィールドデータがあるか判定し(ステップS201)、あるならばそのフィールドデータを取得し(ステップS202)、対応するフィールドをフィールドリストから取得し(ステップS203)、取得できたかどうか判定し(ステップS204)、取得できていればステップS202で取得したフィールドデータをステップS203で取得したフィールドに流し込む(ステップS205)。フィールドデータの流し込みが終了すればステップS201に戻る。また、ステップS204でフィールドが取得できなかったと判定された場合もステップS201に戻る。以降フィールドデータがなくなるまでステップS201〜ステップS205を繰り返す。
【0029】
ステップS205のフィールドデータ流し込み処理の流れを示すフローチャートを図3に示す。フィールドデータ流し込み処理は、フィールドの入力ピクチャを解析して、ピクチャ単語(連続して処理されるべき入力ピクチャのことを「ピクチャ単語」と呼ぶ、以下同じ)を切り出しデータテーブルを作成し、ピクチャ単語中の繰り返し記法を連続したピクチャ文字に展開し、フィールドデータを解析してデータテーブルのフィールドデータ単語(切り出したピクチャ単語に対応するフィールドデータのことを「フィールドデータ単語」と呼ぶ、以下同じ)に格納し、作成されたデータテーブルからフィールドにフィールドデータをセットするものである。
【0030】
まず、データテーブルを空に初期化する(ステップS301)。データテーブルは、以下で説明されるピクチャ単語とデータ長とデータ不定フラグとフィールドデータ単語の組を格納するためのプログラムワークメモリ906中のテーブルである。
【0031】
次に、ピクチャを解析してピクチャ単語を切り出してデータテーブルを作成する(ステップS302)。更に、作成されたデータテーブルのピクチャ単語中に繰り返し記法があれば、繰り返し記法を使わない連続したピクチャ文字に展開し(ステップS303)、フィールドデータを解析してデータテーブルのフィールドデータ単語に格納し(ステップS304)する。
【0032】
図16は、入力ピクチャ「Y(0)年M(2)月DD日」に対するフィールドデータ「2001年12月13日」の場合のデータテーブルの例である。最後に、データテーブルに格納されたピクチャ単語とフィールドデータ単語に基づいて、フィールドにフィールドデータをセットし(ステップS305)、処理を終了する。
【0033】
ステップS302のピクチャ解析処理の流れを示すフローチャートを図4に示す。ピクチャ解析処理は、まだ処理されていない入力ピクチャの文字列からピクチャ単語を1つ切り出し、ピクチャ単語、フィールドデータ単語文字数、データ長不定フラグと空のフィールドデータ単語の組をデータテーブルに追加するものである。
【0034】
まず、ステップS203で取得したフィールドの入力ピクチャの文字列の文字数を表わす変数PL0をセットし(ステップS401)、処理済入力ピクチャ文字数を表わす変数PLを0に初期化する(ステップS402)。
【0035】
次に、PLとPL0を比較して(ステップS403)、PLの方が小さければ、まだ処理されていない入力ピクチャのPL番目(0オリジン)以降の文字からピクチャ単語を1つ切り出し、その文字列を変数PWS、その文字数を変数PWLにセットする(ステップS404)。
【0036】
ピクチャ単語は連続して処理されるべき入力ピクチャのことである。これは入力ピクチャを構成する3種類の文字、型指定文字・スキップ文字・固定文字の同じ種類の文字が連続した文字列となる。繰り返し記法は繰り返しの対象のピクチャ文字と同じ種類とみなす。
【0037】
例えば、「Y(0)年M(2)月DD日」の場合、「Y(0)」「年」「M(2)」「月」「DD」「日」が各ピクチャ単語になる。ステップS404の際には、ピクチャ単語が受け取るべきフィールドデータ(フィールドデータ単語)の文字数をDWLに、フィールドデータ単語の文字数が不定であるかを表すデータ長不定フラグを変数DWFにセットする。
【0038】
次に、PWS、DWL、DWFと空のフィールドデータ単語の組をデータテーブルに追加する(ステップS405)。そして、PWLをPLに加算し(ステップS406)、以降、ステップS403〜406を入力ピクチャがすべて処理されるまで繰り返し、処理を終了する。入力ピクチャが全て処理されれば、つまりステップS403でPL=PL0と判定されれば、データテーブルには、入力ピクチャを構成する全てのピクチャ単語とそれに対応するフィールドデータ単語長とデータ長不定フラグと空のフィールドデータ単語の組のテーブルが出来ている。
【0039】
ステップS404のピクチャ単語切り出し処理の流れを示すフローチャートを図5に示す。ピクチャ単語切り出し処理は、まだ処理されていない入力ピクチャの最初の文字を取得し、そのピクチャ文字と異なる種類のピクチャ文字が現れるまで、もしくは最後のピクチャ文字まで順次ピクチャ文字を検索し、同じ種類のピクチャ文字およびその繰り返し記法で構成されるピクチャ単語として切り出すものである。
【0040】
まず、入力ピクチャのPL番目(0オリジン)の文字を取得して変数P1にセットする(ステップS501)。更に、ピクチャ単語の文字列を表わすPWS、文字数を表わすPWL、ピクチャ単語が受け取るべきフィールドデータ(フィールドデータ単語)の文字数を表すDWL、フィールドデータ単語の文字数が不定である、つまりピクチャ単語に不定繰り返し記法が使われているかを表すデータ長不定フラグの変数DWFを初期化する(ステップS502)。PWSはP1、PWLは1、DWLは1、DWFはOFFとなる。
【0041】
そして、次のピクチャ文字を取得して変数P2にセットし(ステップS503)、取得できたか判定し(ステップS504)、取得できれば、P2が繰り返し数開始文字「(」であるか判定する(ステップS505)。「(」でなければ、P1とP2が同じ種類のピクチャ文字であるか判定し(ステップS506)(ステップS405)、同じ種類でなければ処理を終了し、同じ種類であれば、文字列PWSに文字P2を、PWLに1を加え(ステップS507)、ステップS503に戻る。
【0042】
ステップS505でP2が「(」であれば、繰り返し数終了文字「)」までの文字列を変数P3、「)」を変数P4にセットし(ステップS508)、文字列PWSに文字P2〜P4までの文字列を、PWLにP3の文字数(LEN(P3))と繰り返し文字の2を加える(ステップS509)。
【0043】
そして、P3(必ず0以上の整数)が「0」か判定し(ステップS510)、「0」であれば、DWFをONに(ステップS511)、「0」でなければ、DWLにP3の数字−1を加え(ステップS512)、ステップS503に戻る。そして、ステップS503〜512を、異なる種類のピクチャ文字が現れるまで、もしくは入力ピクチャがすべて処理されるまで繰り返し、処理を終了し、文字列PWSをピクチャ単語として切り出す(なお、このときPWLには切り出されたピクチャ単語の文字数が、DWLには切り出されたピクチャ単語が受け取るべきフィールドデータの文字数がはいっていることとなる)。
【0044】
ステップS303のピクチャ展開処理の流れを示すフローチャートを図6に示す。ピクチャ展開処理は、データテーブルの全てのエントリのフィールドデータ単語長の和をフィールドデータ文字数から引いた値を不定長データ文字数として取得し、不定長データ文字数をデータ長不定フラグがOFFのエントリのフィールドデータ単語文字数に加算し、繰り返し記法の記述を連続したピクチャ文字に展開するものである。
【0045】
まず、データテーブルの最初のエントリがあるか判定し(ステップS601)、エントリがあればそのエントリを取得する(ステップS602)。
【0046】
次に、そのエントリのDWFがONか判定し(ステップS603)、ONであれば、データテーブルの全てのエントリのDWLの和をステップS202で取得したフィールドデータの文字数から引いた値を不定長データ文字数を表わす変数Lにセットする(ステップS604)。
【0047】
Lは、このピクチャ単語PWSに含まれている不定繰り返し記法に流し込まれるべきフィールドデータの文字数を表し、DWLは不定繰り返し記法も含んだ受け取るべきフィールドデータ単語の文字数になる。ステップS603でOFFと判定されれば、ステップS604をスキップする。そして、繰り返し記法の記述を連続したピクチャ文字に展開し(ステップS606)、ステップS601に戻り、全てのデータテーブルのエントリに対してステップS601〜ステップS606を繰り返し、処理を終了する。
【0048】
ステップS303の繰り返し記法展開処理の流れを示すフローチャートを図7に示す。繰り返し記法展開処理は、データテーブルの全てのエントリのピクチャ単語に対して、検索して見つかった繰り返し記法の繰り返し数が0か判定し、繰り返し数が0ならば、上記ピクチャ展開処理で取得した不定長データ文字数−1を展開数として取得し、繰り返し数が0でないならば繰り返し記法の繰り返し数−1を展開数として取得し、繰り返し記法の文字列を展開数分の繰り返し記法の対象のピクチャ文字展開数分で置き換えるものである。
【0049】
まず、ループ変数nを0に初期化する(ステップS701)。そして、ステップS602で取得したエントリのPWSのn番目の文字を変数P1、(n+1)番目の文字を変数P2にセットし(ステップS702)、P2が取得できたか判定し(ステップS703)、出来なければ処理を終了する。取得できれば、P2が繰り返し数開始文字「(」か判定し(ステップS704)、「(」であれば、繰り返し数終了文字「)」までの文字列を変数P3、「)」を変数P4にセットする(ステップS705)そして、P3(必ず0以上の整数)が「0」か判定し(ステップS706)、「0」でなければ、変数RをP3に(ステップS707)、「0」であれば、をRをLに(ステップS708)セットし(ステップS512)、文字列PWSの文字P2〜P4までの文字列を(R−1)個分の文字P1に置き換える(ステップS709)。
【0050】
nにP3の文字数と繰り返し文字の2を加え(ステップS710)、ステップS704で「(」でないと判定されれば、nに1を加え(ステップS711)、nがPWSの文字数より小さいか判定し(ステップS712)、小さければステップS702に戻る。ステップS712でnがPWSの文字数になるまで、もしくはステップS703でPWSの(n+1)番目の文字が取得できなくなるまで、ステップS702〜712を繰り返し、処理を終了する。
【0051】
ステップS304のフィールドデータ解析処理の流れを示すフローチャートを図8に示す。フィールドデータ解析処理は、データテーブルの全てのエントリのピクチャ単語に対して、フィールドデータのまだ処理されていない文字からフィールドデータ単語を切り出しデータテーブルのフィールドデータ単語に格納するものである。
【0052】
まず、ステップS202で取得したフィールドデータの文字数を表わす変数DL0をセットし(ステップS801)、処理済フィールドデータ文字数を表わす変数DLを0に初期化する(ステップS802)。
【0053】
そして、データテーブルの最初のエントリがあるか判定し(ステップS803)、エントリがなければ処理を終了する。エントリがあればそのエントリを取得し(ステップS804)、まだ処理されていないフィールドデータのDL番目(0オリジン)以降の文字からフィールドデータ単語を1つ切り出し、その文字列をステップS602で取得したエントリのフィールドデータ単語DWS、その文字数を変数DWLにセットし(ステップS805)、DLにDWLを加算し(ステップS806)、DLがDL0より小さいか判定し(ステップS807)、小さければ、ステップS803に戻る。
【0054】
以降、ステップS803〜807をデータテーブルがなくなるまで、もしくはフィールドデータがすべて処理されるまで繰り返し、処理を終了する。処理が終了すれば、データテーブルの各エントリのフィールドデータ単語には文字列がセットされている。
【0055】
ステップS805のフィールドデータ単語切り出し処理の流れを示すフローチャートを図9に示す。フィールドデータ単語切り出し処理は、フィールドデータのまだ処理されていない文字を取得し、切り出されたピクチャ単語のフィールドデータ文字に対応するピクチャ文字を取得し、取得したピクチャ文字の種類を判定し、固定文字なら、取得したピクチャ文字が取得したフィールドデータ文字と同じか判定し、型指定文字なら、取得したピクチャ文字が取得したフィールドデータ文字を受け取れる型指定文字か判定し、切り出されたピクチャ単語の文字数分もしくはフィールドデータの最後まで処理をループするものである。
【0056】
まず、フィールドデータ単語の文字列を表わすDWS、文字数を表わすDWLを初期化する(ステップS901)。DWSはNULL(空文字)、DWLは0となる。更に、ループカウンタ変数nを0に初期化する(ステップS902)。
【0057】
次に、まだ処理されていない(DL+n)番目(0オリジン)のフィールドデータの文字を取得し変数D1にセットする(ステップS903)。D1が取得できたかどうか判定し(ステップS904)、取得できなければ、処理を終了する。D1が取得できれば、ステップS804で取得したエントリのピクチャ単語PWSのn番目(0オリジン)のピクチャ文字を変数P1にセットし(ステップS905)、P1のピクチャ文字種を判定し(ステップS906)、処理を切り替える。
【0058】
P1が固定文字であれば、P1がD1と同じ文字か判定し(ステップS907)、同じでなければ、エラー処理を行い(ステップS908)、処理を終了する。P1がピクチャ文字であれば、P1がD1を受け取れる型指定文字であるか判定し(ステップS909)、受け取れる型指定文字でなければ、エラー処理を行い(ステップS910)、処理を終了する。ステップS906でP1がスキップ文字であったり、ステップS907でP1がD1と同じ文字であったり、ステップS909でP1がD1を受け取れるピクチャ文字であると判定されれば、DWSにD1を、DWLに1を加え(ステップS911)、nに1を加える(ステップS912)。そして、nがピクチャ単語の文字数PWLより小さいか判定し(ステップS913)、小さければ、ステップS903に戻り、nがPWLと同じになるまでステップS903〜ステップS913を繰り返し、処理を終了する。
【0059】
ステップS305のフィールドデータセット処理の流れを示すフローチャートを図10に示す。フィールドデータセット処理は、フィールドのデータ型に対して足りないピクチャ単語と空のフィールドデータの組をデータテーブルに追加し、データテーブル中の足りないフィールドデータ単語を補完し、データテーブル中のフィールドデータ単語の有効範囲をチェックし、エラーでなければ、フィールドにフィールドデータをセットするものである。
【0060】
まず、フィールドのデータ型に対して足りないピクチャ単語と空のフィールドデータ単語の組をデータテーブルに追加する(ステップS1001)。
【0061】
例えば、データ型が日付型のフィールドは西暦年月日を格納するのだが、入力ピクチャが「MMDD」であった場合、「YYYY」のピクチャ単語と空のフィールドデータ単語を組にしてデータテーブルに追加する。次にデータテーブルの空のフィールドデータ単語や短いフィールドデータ単語のデータを補完する(ステップS1002)。
【0062】
例えば、「YYYY」のピクチャ単語に対するフィールドデータ単語が空の場合、処理している時点での西暦年をセットしたりする。次に、フィールドのデータ型に対してデータテーブルのデータが有効範囲外のデータになっていないかチェックする(ステップS1003)。例えば、日付型のフィールドに対して、ピクチャ単語「MM」に対するフィールドデータ単語が「1」〜「12」であるかチェックする。
【0063】
チェックした結果がエラーか判定し(ステップS1004)、データの有効範囲チェックがエラーでなければ、データテーブルの型指定文字のピクチャ単語に対するフィールドデータ単語を組み合わせたフィールドデータをフィールドにセットする(ステップS1005)。例えば、日付型のデータ型のフィールドが1900年1月1日からの経過日数を格納する場合、図16のようなデータテーブルに対しては、1900年1月1日から2001年12月13日までの日数をフィールドにセットする。ステップS604でエラーであれば、エラー処理を行い(ステップS1006)、処理を終了する。
【0064】
以上の説明から明らかなように、フィールドデータの文字数が多い場合でも、繰り返し記法を使うことにより、設定する入力ピクチャの文字数を少なくできるため、入力ピクチャ設定画面での入力が容易になり、文字数の入力ミスを減らすことができる。
【0065】
また、フィールドデータの文字数が不定である場合でも、フィールドデータを流し込む際に、データソースに格納されているフィールドデータを加工することなく流し込むことが可能となる。
【0066】
【他の実施形態】
なお、本発明は、複数の機器(例えばホストコンピュータ,インタフェイス機器,リーダ,プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機,ファクシミリ装置など)に適用してもよい。
【0067】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。
【0068】
この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0069】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピ(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることができる。
【0070】
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0071】
さらに、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0072】
【発明の効果】
以上説明したように本発明によれば、帳票内のフィールドにフィールドデータを流し込む帳票処理において、フィールド属性の設定作業を簡便化することが可能となる。また、フィールドデータの流し込み作業を簡便化することが可能となる。
【図面の簡単な説明】
【図1】本発明の実施形態にかかる帳票処理装置のハードウェア構成を示すブロック図である。
【図2】本発明の実施形態にかかる帳票処理装置におけるデータ処理の流れを示すフローチャートである。
【図3】本発明の実施形態にかかる帳票処理装置におけるデータ処理の流れを示すフローチャートである。
【図4】本発明の実施形態にかかる帳票処理装置におけるデータ処理の流れを示すフローチャートである。
【図5】本発明の実施形態にかかる帳票処理装置におけるデータ処理の流れを示すフローチャートである。
【図6】本発明の実施形態にかかる帳票処理装置におけるデータ処理の流れを示すフローチャートである。
【図7】本発明の実施形態にかかる帳票処理装置におけるデータ処理の流れを示すフローチャートである。
【図8】本発明の実施形態にかかる帳票処理装置におけるデータ処理の流れを示すフローチャートである。
【図9】本発明の実施形態にかかる帳票処理装置におけるデータ処理の流れを示すフローチャートである。
【図10】本発明の実施形態にかかる帳票処理装置におけるデータ処理の流れを示すフローチャートである。
【図11】本発明の実施形態にかかる帳票処理装置を構成する記憶媒体中の帳票処理プログラムの構成を示す図である。
【図12】本発明の実施形態にかかる帳票処理装置における帳票処理プログラムが実行可能となった状態のメモリマップを示す図である。
【図13】本発明の実施形態にかかる帳票処理装置におけるフィールドリストとフィールド属性の一例を示す図である。
【図14】本発明の実施形態にかかる帳票処理装置におけるピクチャ文字の種類に対する一例を示す図である。
【図15】本発明の実施形態にかかる帳票処理装置におけるフィールドのデータ型と入力ピクチャの設定画面の一例を示す図である。
【図16】本発明の実施形態にかかる帳票処理装置における1つのフィールドとフィールドデータに対して作成されたデータテーブルの一例を示す図である。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention provides a program for flowing data described in a field data source (hereinafter referred to as "field data") into a predefined field (a memory area in a program for receiving data of the field data source) in a form. And a form processing program.
[0002]
[Prior art]
The form processing program is a program for flowing field data into fields defined in advance in a form, and the program causes field data according to the field attribute of each field to flow.
[0003]
The field attribute is information individually included in each field in the flow of the field data. For example, the input picture is a character string representing a format of the field data that can be received by the field.
[0004]
Specifically, the input picture is described by arranging picture characters (each character of the input picture is referred to as “picture character”) for the number of characters of the field data. YYYY / MM / DD "is set.
[0005]
[Problems to be solved by the invention]
However, in the conventional method, when the number of characters of the field data set as the field attribute is large, the number of characters of the input picture to be described is also large. Therefore, input on the input picture setting screen (setting of the field attribute) is troublesome. In some cases, the number of characters was incorrectly entered.
[0006]
If the number of characters in the field data is undefined, the form processing program that pours the field data stores the field data stored in the data source according to the number of characters in the input picture. In the case of a numeric type field, it is necessary to add a space before the field data and add a space to the field (that is, after processing the field data).
[0007]
The present invention has been made in view of the aforementioned problems, and has the following objects.
(1) It is an object of the present invention to simplify a field attribute setting operation in a form processing in which field data is poured into a field in a form.
(2) In the form processing in which field data is poured into a field in the form, the field data can be poured without processing the field data in accordance with the set field attribute, so that the field data can be poured. Is intended to be simplified.
(3) Still another object of the present invention is to provide a form processing method, a form processing apparatus, and a program for realizing a form processing method by a computer, which solves the above problems.
[0008]
[Means for Solving the Problems]
In order to achieve the above object, a form processing method according to the present invention has the following configuration. That is,
A form processing method for reading a field data source storing data to be poured into a field defined in a form, and flowing data of the field data source into a field in the form,
A reading step of reading a character string that is a character string included in the field attribute information set for each of the fields and that is composed of characters representing a format of the data to be poured;
When pouring into the field, a recognition step of recognizing the number of repetitions for repeatedly pouring predetermined data from the read character string,
A flowing step of repeatedly flowing the predetermined data into the field based on the recognized number of repetitions.
[0009]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. When terms used in the following description are defined in advance, “form” refers to a file having a frame line, a fixed figure, a character, etc., and capable of flowing field data into a defined field. And The "field data source" refers to a data source file (or database) in which data to be flowed into a field defined in a form is stored for each data item. The “data item” refers to an element constituting a set of field data.
[0010]
FIG. 1 is a block diagram showing a system configuration of a form processing apparatus according to an embodiment of the present invention. 2 to 10 are flowcharts showing the flow of data processing in the form processing device of FIG.
[0011]
In FIG. 1, 1 is a central processing unit, 2 is a storage device such as a RAM, 3 is a display device such as a CRT, 4 is a keyboard, 5 is a mouse, and 6 is an external auxiliary storage device. The external auxiliary storage device 6 indicates that a program or the like is distributed from the medium to the form processing device. As a storage medium for storing programs and the like, a ROM, a floppy (registered trademark) disk, a CD-ROM, a hard disk, a memory card, a magneto-optical disk, and the like can be used. FIG. 11 shows a configuration of a form processing program in a storage medium.
[0012]
FIG. 12 shows a memory map in a state where the form processing program, the field list, and the field data are stored in the storage device 2 and the program becomes executable.
[0013]
The field list is data in which field information is stored in the order of the fields (FIG. 13). Each field has a field attribute. The field attribute includes a field ID, a field name, a field format, a data type, an input picture, and the like.
[0014]
The field ID is a unique number that identifies a field within a program. The field name is a unique character string for the user to identify the field.
[0015]
The field format takes a value such as fixed / variable / auto. Fields with a fixed field format (hereinafter, fixed fields) receive data common to each print page, fields with a variable field format (hereinafter, variable fields) receive data that changes every print page, and the field format is automatic. (Hereinafter referred to as an automatic field) receives data automatically generated by the program, for example, the date and time at the start of printing and the print page.
[0016]
The data type indicates the type of data to be received, and takes a value such as a character / numerical value / date / time / barcode.
[0017]
The input picture is a character string indicating the format of the field data received by the field, and the field interprets the field data to flow according to this format. The input picture is composed of four types of picture characters: type designating characters, skipping characters, fixed characters, and repeated characters.
[0018]
FIG. 14 shows examples of four types of picture characters. The type designating character specifies how to interpret the character of the corresponding field data. For example, "9" means interpreting as a numerical value, "X" means a character, and "G" means interpreting as an era kanji. Field data that cannot be interpreted by the type designating character is regarded as not following the input picture, and an error occurs. For example, if field data of “character” is poured into “9 (numerical value)” and field data of “year” is poured into “G (genji kanji)”, an error occurs.
[0019]
Characters that can be used, combinations, orders, etc., may be limited depending on the data type. For example, if the data type is a date type, the type specification characters that can be used are “Y” (year), “M” (month), “D” (day), “G (double-byte character)” (Chinese era), "G" (Japanese calendar year), there is a restriction that "Y" and "G" cannot be combined, and "G" and "g" must be combined. There is a restriction that it cannot be discontinuous in one input picture. It is assumed that such a restriction is made when setting an input picture.
[0020]
FIG. 15 is an example of a screen for setting the data type of the field and the input picture. On this screen, the user selects a data type from the list, inputs an input picture, and presses the OK button. The combination with the data type and the combination of type designation characters are checked. Appears and cannot be set.
[0021]
The skip character specifies that an arbitrary character of the corresponding field data is skipped, and is a character that is not used as a type specification character. For example, for the picture “YYYY! MM! DD”, “2001/12/13” and “2001% 12% 13” are both interpreted as meaning December 13, 2001.
[0022]
The fixed character specifies that a specific character of the corresponding field data is skipped, and is a character other than the type designating character, the skip character, and the repeated character. If the character of the corresponding field data is not a specific character, it is determined that the field data does not conform to the input picture, and an error occurs.
[0023]
For example, the field data of “December 13, 2001” can be poured into a field of the date type in which the input picture is set to “YYYY MM / DD / DD”. The field data of "day" is an error. The repetition character specifies that the picture character immediately before "(" is to be repeated n times in a repetition notation in the format of "(n)" (n: an integer of 0 or more).
[0024]
For example, “9 (10)” is equivalent to “99999999999”. The repetition notation is effective for any picture character such as a type designating character, a skipping character, and a fixed character, but cannot be described at the beginning of an input picture. When the number of repetitions is 0, it has a special meaning that the number of characters is indefinite, and is called indefinite repetition notation.
[0025]
For example, the field data that can be poured into the input picture “9 (4)” is limited to a 4-digit numerical value, but the field data that can be poured into the input picture “9 (0)” is handled by the form processing program. Any number of digits is acceptable as long as it is within the range. Indefinite repetition notation can be used only once in an input picture of one field. This is because the number of characters of field data to be poured into each picture character cannot be specified if there is a plurality of indefinite repetition notations.
[0026]
For example, the input picture of “Y (0) year M (2) month D (2) day” is valid, but the input picture of “Y (0) year M (0) month D (2) day” is invalid. It is. On the input picture input screen, repetition notation is also checked, and if invalid, an error is displayed and settings cannot be made.
[0027]
The present embodiment is an example in which a plurality of field data are sequentially poured into corresponding fields, and a form processing program performs processing in a procedure as shown in FIG.
[0028]
First, it is determined whether there is first field data from the data source (step S201), and if so, the field data is obtained (step S202), and the corresponding field is obtained from the field list (step S203). It is determined whether or not the field data has been acquired (step S204), and the field data acquired in step S202 is poured into the field acquired in step S203 (step S205). When the flow of the field data is completed, the process returns to step S201. If it is determined in step S204 that the field could not be obtained, the process returns to step S201. Thereafter, steps S201 to S205 are repeated until there is no more field data.
[0029]
FIG. 3 is a flowchart showing the flow of the field data filling process in step S205. The field data filling process analyzes an input picture of a field, cuts out a picture word (an input picture to be processed continuously is called a “picture word”, the same applies hereinafter), creates a data table, and creates a picture word. Expand the repetition notation into continuous picture characters and analyze the field data to form a field data word in the data table (the field data corresponding to the clipped picture word is called "field data word"; the same applies hereinafter). The field data is set in the field from the stored and created data table.
[0030]
First, the data table is initialized to empty (step S301). The data table is a table in the program work memory 906 for storing a set of a picture word, a data length, a data undefined flag, and a field data word described below.
[0031]
Next, a picture is analyzed and a picture word is cut out to create a data table (step S302). Further, if there is a repetition notation in the picture word of the created data table, it is developed into a continuous picture character without using the repetition notation (step S303), and the field data is analyzed and stored in the field data word of the data table. (Step S304).
[0032]
FIG. 16 is an example of the data table in the case of the field data “December 13, 2001” for the input picture “Y (0) year M (2) month DD day”. Finally, field data is set in the field based on the picture word and the field data word stored in the data table (step S305), and the process ends.
[0033]
FIG. 4 is a flowchart showing the flow of the picture analysis processing in step S302. In the picture analysis processing, one picture word is cut out from a character string of an input picture that has not been processed yet, and a set of a picture word, the number of characters of field data words, an indefinite data length flag, and an empty field data word is added to a data table. It is.
[0034]
First, a variable PL0 representing the number of characters in the character string of the input picture of the field acquired in step S203 is set (step S401), and a variable PL representing the number of processed input picture characters is initialized to 0 (step S402).
[0035]
Next, PL is compared with PL0 (step S403). If PL is smaller, one picture word is cut out from the PL-th (0 origin) and subsequent characters of the unprocessed input picture, and the character string Is set in a variable PWS and the number of characters is set in a variable PWL (step S404).
[0036]
A picture word is an input picture to be processed continuously. This is a character string in which three types of characters constituting the input picture, characters of the same type, that is, type designation characters, skip characters, and fixed characters, are continuous. Repeat notation is regarded as the same type as the picture character to be repeated.
[0037]
For example, in the case of “Y (0) year M (2) month DD day”, “Y (0)”, “year”, “M (2)”, “month”, “DD”, and “day” are picture words. In step S404, the number of characters of the field data (field data word) to be received by the picture word is set to DWL, and the data length undefined flag indicating whether the number of characters of the field data word is undefined is set to the variable DWF.
[0038]
Next, a set of PWS, DWL, DWF and an empty field data word is added to the data table (step S405). Then, PWL is added to PL (step S406), and thereafter, steps S403 to S406 are repeated until all the input pictures have been processed, and the process is terminated. If all the input pictures have been processed, that is, if PL = PL0 is determined in step S403, the data table contains all the picture words constituting the input picture, the corresponding field data word length, and the data length undefined flag. An empty field data word set table is created.
[0039]
FIG. 5 is a flowchart showing the flow of the picture word cutout processing in step S404. The picture word segmentation process obtains the first character of an input picture that has not been processed yet, searches for a picture character until a different type of picture character from that picture character appears, or sequentially searches for the last picture character, and searches for the same type of character. It is cut out as a picture word composed of a picture character and its repetition notation.
[0040]
First, the PL-th (0 origin) character of the input picture is obtained and set in a variable P1 (step S501). Further, PWS representing the character string of the picture word, PWL representing the number of characters, DWL representing the number of characters of the field data (field data word) to be received by the picture word, and the number of characters of the field data word are indefinite, that is, the picture word is indefinitely repeated A variable DWF of a data length indefinite flag indicating whether the notation is used is initialized (step S502). PWS is P1, PWL is 1, DWL is 1, and DWF is OFF.
[0041]
Then, the next picture character is obtained and set in the variable P2 (step S503), and it is determined whether or not the next picture character has been obtained (step S504). If it can be obtained, it is determined whether or not P2 is the repetition number start character "(" (step S505). If it is not "(", it is determined whether P1 and P2 are the same type of picture character (step S506) (step S405), and if they are not the same type, the process is terminated; The character P2 is added to PWS and 1 is added to PWL (step S507), and the process returns to step S503.
[0042]
If P2 is "(" in step S505, a character string up to the repetition number end character ")" is set as a variable P3 and ")" is set as a variable P4 (step S508), and characters P2 to P4 are set in the character string PWS. Is added to the PWL by the number of characters of P3 (LEN (P3)) and 2 of the repeated characters (step S509).
[0043]
Then, it is determined whether or not P3 (always an integer of 0 or more) is "0" (step S510). If "0", DWF is turned on (step S511). -1 is added (step S512), and the process returns to step S503. Steps S503 to S512 are repeated until a different type of picture character appears or until all the input pictures are processed, the processing is terminated, and the character string PWS is cut out as a picture word (at this time, the cutout is set to PWL. The number of characters of the extracted picture word is included in the DWL, and the number of characters of the field data to be received by the extracted picture word is included in DWL).
[0044]
FIG. 6 is a flowchart showing the flow of the picture expansion process in step S303. The picture expansion process obtains a value obtained by subtracting the sum of the field data word lengths of all the entries of the data table from the number of field data characters as the number of indefinite length data characters, and converts the number of indefinite length data characters into the field of the entry with the data length undefined flag OFF. This is added to the number of data word characters, and the description of the repetition notation is expanded into continuous picture characters.
[0045]
First, it is determined whether there is a first entry in the data table (step S601), and if there is an entry, the entry is acquired (step S602).
[0046]
Next, it is determined whether or not the DWF of the entry is ON (step S603). If it is ON, the value obtained by subtracting the sum of the DWLs of all the entries of the data table from the number of characters of the field data acquired in step S202 is the variable length data. It is set in a variable L representing the number of characters (step S604).
[0047]
L represents the number of characters of the field data to be included in the indefinite repetition notation included in the picture word PWS, and DWL is the number of characters of the field data word to be received including the indefinite repetition notation. If it is determined to be OFF in step S603, step S604 is skipped. Then, the description of the repetition notation is expanded into continuous picture characters (step S606), and the process returns to step S601 to repeat steps S601 to S606 for all data table entries, and ends the processing.
[0048]
FIG. 7 is a flowchart showing the flow of the repetition notation expansion process in step S303. The repetition notation expansion processing determines whether the number of repetitions of the repetition notation found by searching for the picture words of all entries in the data table is 0, and if the number of repetitions is 0, the indefinite number obtained in the picture expansion processing is determined. If the number of long data characters -1 is obtained as the number of expansions, and if the number of repetitions is not 0, the number of repetitions of the repetition notation -1 is obtained as the number of expansions. It is replaced by the number of expansions.
[0049]
First, a loop variable n is initialized to 0 (step S701). Then, the nth character of the PWS of the entry acquired in step S602 is set as a variable P1 and the (n + 1) th character is set as a variable P2 (step S702), and it is determined whether P2 has been acquired (step S703). If it is, the process ends. If acquired, it is determined whether P2 is the repetition number start character "(" (step S704), and if "(", the character string up to the repetition number end character ")" is set as the variable P3 and ")" is set as the variable P4. (Step S705) Then, it is determined whether P3 (always an integer greater than or equal to 0) is “0” (Step S706). If not “0”, the variable R is set to P3 (Step S707), and if “0”, , R to L (step S708) (step S512), and replace the character strings P2 to P4 of the character string PWS with (R-1) characters P1 (step S709).
[0050]
The number of characters of P3 and 2 of repeated characters are added to n (step S710), and if it is determined that it is not "(" in step S704, 1 is added to n (step S711) and it is determined whether n is smaller than the number of characters of PWS. (Step S712) If smaller, the process returns to Step S702, and Steps S702 to S712 are repeated until n becomes the number of PWS characters in Step S712 or until the (n + 1) th character of PWS cannot be obtained in Step S703. To end.
[0051]
FIG. 8 is a flowchart showing the flow of the field data analysis processing in step S304. In the field data analysis processing, a field data word is cut out from the unprocessed characters of the field data for the picture words of all entries of the data table and stored in the field data word of the data table.
[0052]
First, a variable DL0 representing the number of characters of the field data acquired in step S202 is set (step S801), and a variable DL representing the number of processed field data characters is initialized to 0 (step S802).
[0053]
Then, it is determined whether there is a first entry in the data table (step S803), and if there is no entry, the process ends. If there is an entry, the entry is obtained (step S804), one field data word is cut out from the DL-th (0 origin) and subsequent characters of the unprocessed field data, and the character string is obtained as the entry obtained in step S602. Is set to the variable DWL (step S805), DWL is added to DL (step S806), it is determined whether DL is smaller than DL0 (step S807), and if it is smaller, the process returns to step S803. .
[0054]
Thereafter, steps S803 to S807 are repeated until there is no more data table, or until all the field data has been processed, and the process is terminated. When the processing is completed, a character string is set in the field data word of each entry of the data table.
[0055]
FIG. 9 is a flowchart showing the flow of the field data word extraction processing in step S805. The field data word cutout process obtains unprocessed characters of the field data, obtains a picture character corresponding to the field data character of the cut out picture word, determines the type of the obtained picture character, and determines a fixed character. If it is, determine whether the acquired picture character is the same as the acquired field data character.If the type designating character, determine whether the acquired picture character is a type designating character that can receive the acquired field data character. Alternatively, the processing is looped until the end of the field data.
[0056]
First, DWS representing the character string of the field data word and DWL representing the number of characters are initialized (step S901). DWS is NULL (empty character) and DWL is 0. Further, a loop counter variable n is initialized to 0 (step S902).
[0057]
Next, a character of the (DL + n) -th (0 origin) field data that has not been processed is acquired and set in the variable D1 (step S903). It is determined whether or not D1 has been acquired (step S904), and if not, the process ends. If D1 can be acquired, the n-th (0 origin) picture character of the picture word PWS of the entry acquired in step S804 is set in the variable P1 (step S905), and the picture character type of P1 is determined (step S906). Switch.
[0058]
If P1 is a fixed character, it is determined whether P1 is the same as D1 (step S907). If not, an error process is performed (step S908), and the process ends. If P1 is a picture character, it is determined whether P1 is a type designating character that can receive D1 (step S909). If P1 is not a type designating character, error processing is performed (step S910), and the process ends. If P1 is a skip character in step S906, or if P1 is the same character as D1 in step S907, or if P1 is a picture character that can receive D1 in step S909, D1 is set to DWS and 1 is set to DWL. Is added (step S911), and 1 is added to n (step S912). Then, it is determined whether or not n is smaller than the number of characters PWL of the picture word (step S913). If it is smaller, the process returns to step S903, and steps S903 to S913 are repeated until n becomes equal to PWL, and the process ends.
[0059]
FIG. 10 is a flowchart showing the flow of the field data set process in step S305. Field data set processing adds a set of missing picture words and empty field data to the data table for the data type of the field, complements the missing field data words in the data table, and replaces the field data in the data table. The validity range of the word is checked, and if there is no error, the field data is set in the field.
[0060]
First, a set of a missing picture word and an empty field data word for the field data type is added to the data table (step S1001).
[0061]
For example, a field whose data type is a date type stores the year, month, and year. If the input picture is “MMDD”, a picture word of “YYYY” and an empty field data word are paired in the data table. to add. Next, data of an empty field data word or a short field data word of the data table is complemented (step S1002).
[0062]
For example, if the field data word for the picture word "YYYY" is empty, the year of the year at the time of processing is set. Next, it is checked whether the data in the data table is out of the valid range for the data type of the field (step S1003). For example, for a date type field, it is checked whether the field data words for the picture word “MM” are “1” to “12”.
[0063]
It is determined whether the result of the check is an error (step S1004). If the validity check of the data is not an error, the field data obtained by combining the field word with the picture word of the type designation character in the data table is set in the field (step S1005). ). For example, when the date type data type field stores the number of days that have elapsed since January 1, 1900, a data table as shown in FIG. 16 may be used from January 1, 1900 to December 13, 2001. Set the number of days up to the field. If an error is detected in step S604, error processing is performed (step S1006), and the processing ends.
[0064]
As is clear from the above description, even when the number of characters of the field data is large, the number of characters of the input picture to be set can be reduced by using the repetition notation, so that the input on the input picture setting screen is facilitated, and the number of characters is reduced. Input errors can be reduced.
[0065]
Further, even when the number of characters of the field data is indefinite, when the field data is poured, it is possible to flow the field data stored in the data source without processing.
[0066]
[Other embodiments]
The present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), but it can be applied to a device including one device (for example, a copier, a facsimile device, etc.). May be applied.
[0067]
Further, an object of the present invention is to provide a storage medium storing a program code of software for realizing the functions of the above-described embodiments to a system or an apparatus, and a computer (or CPU or MPU) of the system or apparatus to store the storage medium. It is needless to say that the present invention can also be achieved by reading and executing the program code stored in the program.
[0068]
In this case, the program code itself read from the storage medium realizes the function of the above-described embodiment, and the storage medium storing the program code constitutes the present invention.
[0069]
As a storage medium for supplying the program code, for example, a floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM, or the like is used. be able to.
[0070]
When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also an OS (Operating System) running on the computer based on the instruction of the program code. It goes without saying that a part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing.
[0071]
Further, after the program code read from the storage medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that a CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
[0072]
【The invention's effect】
As described above, according to the present invention, it is possible to simplify the setting operation of the field attribute in the form processing in which the field data is poured into the fields in the form. In addition, it is possible to simplify the operation of filling the field data.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a hardware configuration of a form processing apparatus according to an embodiment of the present invention.
FIG. 2 is a flowchart illustrating a flow of data processing in the form processing apparatus according to the embodiment of the present invention.
FIG. 3 is a flowchart showing a flow of data processing in the form processing device according to the embodiment of the present invention.
FIG. 4 is a flowchart showing a flow of data processing in the form processing apparatus according to the embodiment of the present invention.
FIG. 5 is a flowchart showing a flow of data processing in the form processing apparatus according to the embodiment of the present invention.
FIG. 6 is a flowchart illustrating a flow of data processing in the form processing apparatus according to the embodiment of the present invention.
FIG. 7 is a flowchart showing a flow of data processing in the form processing apparatus according to the embodiment of the present invention.
FIG. 8 is a flowchart showing a flow of data processing in the form processing apparatus according to the embodiment of the present invention.
FIG. 9 is a flowchart showing a flow of data processing in the form processing apparatus according to the embodiment of the present invention.
FIG. 10 is a flowchart showing a flow of data processing in the form processing apparatus according to the embodiment of the present invention.
FIG. 11 is a diagram showing a configuration of a form processing program in a storage medium constituting the form processing apparatus according to the embodiment of the present invention.
FIG. 12 is a diagram showing a memory map in a state in which a form processing program in the form processing apparatus according to the embodiment of the present invention is executable.
FIG. 13 is a diagram showing an example of a field list and field attributes in the form processing apparatus according to the embodiment of the present invention.
FIG. 14 is a diagram illustrating an example of a type of a picture character in the form processing apparatus according to the embodiment of the present invention.
FIG. 15 is a diagram showing an example of a field data type and an input picture setting screen in the form processing apparatus according to the embodiment of the present invention.
FIG. 16 is a diagram showing an example of a data table created for one field and field data in the form processing apparatus according to the embodiment of the present invention.

Claims (12)

帳票内に定義されたフィールドに流し込むデータを格納しているフィールドデータソースを読み込み、該フィールドデータソースのデータを該帳票内のフィールドに流し込む帳票処理装置であって、
前記各フィールドごとに設定されるフィールド属性情報に含まれる文字列であって、流し込まれるデータの書式を表す文字より構成される文字列を読み込む読込手段と、
フィールドに流し込む際に、所定のデータを複数回繰り返して流し込むための繰り返し数を前記読み込まれた文字列より認識する認識手段と、
前記認識した繰り返し数に基づいて、前記所定のデータを繰り返して前記フィールドに流し込む流込手段と
を備えることを特徴とする帳票処理装置。
A form processing apparatus for reading a field data source storing data to be poured into a field defined in a form, and flowing data of the field data source into a field in the form,
A reading unit that reads a character string that is a character string included in field attribute information set for each of the fields and that includes a character representing a format of data to be poured;
When pouring into the field, a recognition means for recognizing the number of repetitions for repeatedly pouring predetermined data from the read character string,
A form processing device, comprising: a filling unit that repeats the predetermined data into the field based on the recognized number of repetitions.
帳票内に定義されたフィールドに流し込むデータを格納しているフィールドデータソースを読み込み、該フィールドデータソースのデータを該帳票内のフィールドに流し込む帳票処理装置であって、
前記各フィールドごとに設定されるフィールド属性情報に含まれる文字列であって、流し込まれるデータの書式を表す文字より構成される文字列を読み込む読込手段と、
前記流し込まれるデータのデータ長が可変であることを表す文字を、前記文字列より認識する認識手段と、
前記文字列より導きだされるデータ長と、該文字列に対応するフィールドに流し込まれるフィールドデータソースのデータのデータ長との差分を算出する算出手段と、
前記算出手段により算出されたデータ長より、前記認識手段により認識された前記データ長が可変のデータのデータ長を決定し、該決定したデータ長に基づいて、前記フィールドデータソースのデータを前記フィールドに流し込む流込手段と
を備えることを特徴とする帳票処理装置。
A form processing apparatus for reading a field data source storing data to be poured into a field defined in a form, and flowing data of the field data source into a field in the form,
A reading unit that reads a character string that is a character string included in field attribute information set for each of the fields and that includes a character representing a format of data to be poured;
Recognition means for recognizing, from the character string, a character indicating that the data length of the poured data is variable,
Calculating means for calculating a difference between a data length derived from the character string and a data length of data of a field data source to be poured into a field corresponding to the character string;
From the data length calculated by the calculation means, the data length recognized by the recognition means is determined to determine the data length of the variable data, and based on the determined data length, the data of the field data source is converted to the field data. And a pouring means for pouring into a form.
帳票内に定義されたフィールドに流し込むデータを格納しているフィールドデータソースを読み込み、該フィールドデータソースのデータを該帳票内のフィールドに流し込む帳票処理方法であって、
前記各フィールドごとに設定されるフィールド属性情報に含まれる文字列であって、流し込まれるデータの書式を表す文字より構成される文字列を読み込む読込工程と、
フィールドに流し込む際に、所定のデータを複数回繰り返して流し込むための繰り返し数を前記読み込まれた文字列より認識する認識工程と、
前記認識した繰り返し数に基づいて、前記所定のデータを繰り返して前記フィールドに流し込む流込工程と
を備えることを特徴とする帳票処理方法。
A form processing method for reading a field data source storing data to be poured into a field defined in a form, and flowing data of the field data source into a field in the form,
A reading step of reading a character string that is a character string included in the field attribute information set for each of the fields and that is composed of characters representing a format of the data to be poured;
When pouring into the field, a recognition step of recognizing the number of repetitions for repeatedly pouring predetermined data from the read character string,
A form processing method, comprising: a step of repeating the predetermined data based on the recognized number of repetitions and pouring the data into the field.
帳票内に定義されたフィールドに流し込むデータを格納しているフィールドデータソースを読み込み、該フィールドデータソースのデータを該帳票内のフィールドに流し込む帳票処理方法であって、
前記各フィールドごとに設定されるフィールド属性情報に含まれる文字列であって、流し込まれるデータの書式を表す文字より構成される文字列を読み込む読込工程と、
前記流し込まれるデータのデータ長が可変であることを表す文字を、前記文字列より認識する認識工程と、
前記文字列より導きだされるデータ長と、該文字列に対応するフィールドに流し込まれるフィールドデータソースのデータのデータ長との差分を算出する算出工程と、
前記算出工程により算出されたデータ長より、前記認識工程により認識された前記データ長が可変のデータのデータ長を決定し、該決定したデータ長に基づいて、前記フィールドデータソースのデータを前記フィールドに流し込む流込工程と
を備えることを特徴とする帳票処理方法。
A form processing method for reading a field data source storing data to be poured into a field defined in a form, and flowing data of the field data source into a field in the form,
A reading step of reading a character string that is a character string included in the field attribute information set for each of the fields and that is composed of characters representing a format of the data to be poured;
A recognition step of recognizing, from the character string, a character indicating that the data length of the poured data is variable;
A calculating step of calculating a difference between a data length derived from the character string and a data length of data of a field data source to be poured into a field corresponding to the character string;
From the data length calculated in the calculation step, the data length recognized in the recognition step is determined to determine the data length of the variable data, and based on the determined data length, the data of the field data source is converted to the field data. And a pouring step of pouring into a form.
前記文字列は、型指定文字またはスキップ文字または固定文字または繰り返し文字もしくはそれらの組み合わせから成り、該型指定文字は、対応するフィールドに流し込まれるフィールドデータソースのデータをどのように解釈するかを表し、該スキップ文字は、対応するフィールドに流し込まれるフィールドデータソースのデータのうち、任意のデータを読み飛ばすことを表し、該固定文字は、対応するフィールドに流し込まれるフィールドデータソースのデータのうち、特定のデータを読み飛ばすことを表し、該繰り返し文字は、対応するフィールドに流し込まれるフィールドデータソースのデータを繰り返し流し込むことを表すことを特徴とする請求項3または4のいずれかに記載の帳票処理方法。The character string is composed of a type designating character or a skip character or a fixed character or a repetition character or a combination thereof, and the type designating character indicates how to interpret data of a field data source flowing into a corresponding field. , The skip character indicates that any data is skipped among the data of the field data source flowing into the corresponding field, and the fixed character is a specific character among the data of the field data source flowing into the corresponding field. 5. The form processing method according to claim 3 or 4, wherein the data indicates that data of a field data source that is to be flowed into a corresponding field is repeatedly flowed. . 前記繰り返し文字は、α(n)と表現されている場合、αをn回繰り返すことを意味することを特徴とする請求項5に記載の帳票処理方法。The form processing method according to claim 5, wherein when the repeated character is expressed as α (n), α is repeated n times. 前記繰り返し文字は、α(0)と表現されている場合、該繰り返し文字に対応するデータのデータ長が可変であることを意味することを特徴とする請求項5に記載の帳票処理方法。The form processing method according to claim 5, wherein when the repeated character is expressed as α (0), it means that the data length of data corresponding to the repeated character is variable. 前記流込工程は、
前記文字列から、連続して処理されるべき文字列をピクチャ単語として切り出す工程と、
前記切り出したピクチャ単語に対するフィールドデータソースのデータをフィールドデータ単語として切り出す工程と、
前記ピクチャ単語が型指定文字か否かを判定し、型指定文字と判定された場合、前記ピクチャ単語とフィールドデータ単語とを組としたデータテーブルを生成する工程と、を備え、
前記データテーブルに基づいて、前記フィールドデータソースのデータを、前記フィールドに流し込むことを特徴とする請求項3または4に記載の帳票処理方法。
The pouring step includes:
Cutting out a character string to be processed continuously from the character string as a picture word;
Cutting out data of a field data source for the cut-out picture word as a field data word;
Determining whether the picture word is a type designating character, and if it is determined that the type word is a type designating character, generating a data table including a set of the picture word and a field data word,
5. The form processing method according to claim 3, wherein data of the field data source is poured into the field based on the data table.
前記フィールド属性情報は、流し込むフィールドデータソースのデータの種類を表すデータ型を有し、
前記流込工程は、前記切り出されたピクチャ単語の数が正しいか否かを、該データ型に基づいて判断し、該ピクチャ単語の数が少ない場合には、該足りないピクチャ単語と、該足りないピクチャ単語に対応するフィールドデータ単語とを前記データテーブルに追加するとともに、該追加されたフィールドデータ単語を補完することを特徴とする請求項8に記載の帳票処理方法。
The field attribute information has a data type indicating a type of data of a field data source to be poured,
The filling step determines whether or not the number of the extracted picture words is correct based on the data type. If the number of the picture words is small, the missing picture words and the missing 9. The form processing method according to claim 8, further comprising adding a field data word corresponding to a missing picture word to the data table, and complementing the added field data word.
前記流込工程は、前記フィールドデータソースのデータが有効であるか否かを前記データ型に基づいて判断し、有効であった場合に、前記フィールドに流し込むことを特徴とする請求項9に記載の帳票処理方法。10. The method according to claim 9, wherein the filling step determines whether or not the data of the field data source is valid based on the data type, and if the data is valid, flows the data into the field. Form processing method. 請求項3乃至10のいずれか1つに記載の帳票処理方法をコンピュータによって実現させるための制御プログラムを格納した記憶媒体。A storage medium storing a control program for causing a computer to implement the form processing method according to any one of claims 3 to 10. 請求項3乃至10のいずれか1つに記載の帳票処理方法をコンピュータによって実現させるための制御プログラム。A control program for causing a computer to implement the form processing method according to any one of claims 3 to 10.
JP2002221821A 2002-07-30 2002-07-30 Form processing device, form processing method, storage medium and program Pending JP2004062659A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2002221821A JP2004062659A (en) 2002-07-30 2002-07-30 Form processing device, form processing method, storage medium and program
EP03254640A EP1387291A3 (en) 2002-07-30 2003-07-23 Apparatus, method, recording medium and program for form processing
US10/627,614 US7200811B1 (en) 2002-07-30 2003-07-28 Form processing apparatus, form processing method, recording medium and program
CNB031498469A CN1278257C (en) 2002-07-30 2003-07-28 Apparatus, method, recording medium and program for form processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002221821A JP2004062659A (en) 2002-07-30 2002-07-30 Form processing device, form processing method, storage medium and program

Publications (2)

Publication Number Publication Date
JP2004062659A true JP2004062659A (en) 2004-02-26
JP2004062659A5 JP2004062659A5 (en) 2005-07-21

Family

ID=31942030

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002221821A Pending JP2004062659A (en) 2002-07-30 2002-07-30 Form processing device, form processing method, storage medium and program

Country Status (1)

Country Link
JP (1) JP2004062659A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111046074A (en) * 2019-12-13 2020-04-21 北京百度网讯科技有限公司 Streaming data processing method, device, equipment and medium
CN111688605A (en) * 2019-03-11 2020-09-22 上海欧菲智能车联科技有限公司 Character batch graph cutting method applied to automobile instrument and related equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111688605A (en) * 2019-03-11 2020-09-22 上海欧菲智能车联科技有限公司 Character batch graph cutting method applied to automobile instrument and related equipment
CN111046074A (en) * 2019-12-13 2020-04-21 北京百度网讯科技有限公司 Streaming data processing method, device, equipment and medium
CN111046074B (en) * 2019-12-13 2023-09-01 北京百度网讯科技有限公司 Streaming data processing method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US7519903B2 (en) Converting a structured document using a hash value, and generating a new text element for a tree structure
US7200811B1 (en) Form processing apparatus, form processing method, recording medium and program
JP2004046375A (en) Business form processing device, business form processing method and program
JP2005536783A (en) Section extraction tool for pdf documents
US6175843B1 (en) Method and system for displaying a structured document
CN112527291A (en) Webpage generation method and device, electronic equipment and storage medium
CN111562911A (en) Webpage editing method and device and storage medium
JP4470913B2 (en) Character string search device and program
JP2004062659A (en) Form processing device, form processing method, storage medium and program
JP2002215519A (en) Method and system for web page generation, web page generating program, and recording medium
JP3099469B2 (en) Standard document creation device
JP2009123114A (en) Information processor and information processing method
JP6795767B2 (en) Information processing device and its processing method and program
JP2010039542A (en) Operation information management system
JP4497799B2 (en) Form processing apparatus, form processing method, storage medium, and program
JP4517822B2 (en) Image processing apparatus and program
JP2007219579A (en) Document converter and program
JPWO2005101210A1 (en) Data analysis apparatus and data analysis program
JP7048912B2 (en) Information processing equipment and its processing method and program
JPH01205265A (en) Document shaping device
JP5193894B2 (en) Data editing apparatus, data editing method, and program
CN112286579B (en) Data processing method, device, computer readable storage medium and computer equipment
JP5400344B2 (en) Document conversion apparatus and program
JPH0264696A (en) Character processor
JP2017045112A (en) Print management server, print management method, and print management program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041209

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041209

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060616

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060814

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060901