1325546 九、發明說明: 【發明所屬之技術領域】 本發明係關於-種報表文件產生方法,特別關於 應用於資料庫之客製報表文件產生器及產生方法。 m 【先前技術】 隨者數位技術的發展’許多的資料漸漸的皆以數位次 φ料方式保存,使得資料得以有較方便以及較長久的保存= 法與時間。然而’當資料越來越多時,勢必需要一套;^理 系統來管理資料與維護資料,因此有資料庫的產生。 而資料庫的建立,一般是由資料庫設計者依據所應用 的場合而設計成多個攔位,並且將使用者需要的資料預先 建置於資料庫中以供使用者方便查詢。 請參照圖1A所示,以往,當設計者在設計資料庫時 為了方便識別,通常會定義例如名稱攔位VII、資料型態 •欄位V12、空白攔位vi3以及註解攔位V14等欄位。資料 型態欄位V12係定義使用者需輸入何種格式之資料(例如 字元或數字),而空白攔位V13則是定義此欄位是否可為 空白’可藉以維持系統穩定,另外註解攔位V14則是方便 设§十者了解此搁位之功用。 再請參照圖1B,然而,當使用者在使用資料庫時則僅 能看到名稱欄位VII。對於一般的使用者來說,較難了解 各欄位需填入何種格式的參數或資料,也對每一攔位的作 用不甚了解’因此會造成使用上之不便。 1325546 另外,當設計者需.要修改資料庫内容時,必須針對欲 修改的資料(例如圖1A之資料D1),整筆資料刪除後再新 增,實是對設計者或管理者造成許多的不方便且耗費許多 的時間。 因此,如何使得資料庫能更符合人性化,更便利於一 般使用者、資料庫設計者或管理者的操作,於現今分秒必 爭的產業上,實屬待改善課題之一。 【發明内容】 有鑑於上述課題,本發明之目的為提供一種可讓使用 者更清楚了解所使用之資料庫中各欄位的功能,以方便輸 入或查詢各項資料或參數。 緣是,為達上述目的,依本發明之具客製功能之報表 文件產生器包括有一擷取模組與一報表建立模組,且與一 資料庫配合應用,而資料庫包含有至少一屬性資料檔,及 具有複數個預存程序。其中,擷取模組依據資料庫之預存 程序將屬性資料檔取出,而報表建立模組係建立一電子報 表文件,並將屬性資料檔之内容填入電子報表文件中。 另外,為達上述目的,依本發明之客製報表文件產生 方法係與一資料庫配合應用,資料庫包含有至少一屬性資 料檔,及具有複數個預存程序,而產生方法包含以下步 驟:首先,依據預存程序將屬性資料檔取出,接著,建立 一電子報表文件,最後,將屬性資料檔之内容填入電子報 表文件中。 參數’而可以更了解各欄位的作用=櫚位的各項 確的填入各項參數或L 使用者可以正 【實施方式】 客製=: = =_佳實施例之具 將,的參照符號=:產生方法,其中相同的元件 報表含::::實二具客 :。具客製功能之報 具有複數個預存^序有至少一屬性資料檔(metadata)21,且 擷取模組u係1 資料檔21取出, 像貝枓庫2之預存程序22而將屬性 件3 (例如一 Exeei報表建立模組12係建立一電子報表文 填入電子報表文件文件),並且將屬性資料檔21之内容 性資料樓21其内#中 &接著參照圖3 ’本實施例之屬 性資料211更具有例如包括有至少一屬性資料211,而屬 數P2、一主韃參數^; 參數P1、一資料型態參 如屬性資料211 # °主解參數P4。本實施例中,例 搁位名稱參數P1係可為Name ;資料型 7 1325546 • . 態參數P2係可為varcl^ar (字元);主鍵參數P3所代表的意 義即是當主鍵參數P3被設定時(例如設定為1時),使用者 於使用資料庫2時,於屬性資料211必須要填入資料而不 可空白;註解參數P4係可填入代表此屬性資料211所要 代表的意義,例如為教材名稱,即代表此屬性資料211所 代表的是要使用者填入教材名稱的攔位,當然内容皆可視 需求而變更。 φ 請參照圖4所示,本發明較佳實施例之具客製功能之 報表文件產生器更可包含一修改模組13、一更新模組14、 一列印模組15、及一翻譯模組16。其中,修改模組13係 用以修改填入於電子報表文件3中之屬性資料檔21的内 容,意即可修改如上所述之屬性資料211中的各參數;更 新模組14係利用預存程序22,且依據修改後之電子報表 文件3中之屬性資料檔21’的内容來更新資料庫2中的屬 性資料檔21 ;列印模組15係藉由一列印設備4 (例如一 • 印表機),將填入有屬性資料檔21之内容的電子報表文件 3,列印成一書面文件;翻譯模組16係針對電子報表文件 - 3中所紀錄之屬性資料構21的内容,執行了語言翻譯動 . 作,例如為將繁體中文之屬性資料檔翻譯成簡體中文之屬 性資料檔,或作英文與中文等語系轉換與翻譯。於翻譯 時,除可將字體直接翻譯之外,亦可作語意(semantic) 轉換,例如將”計程車”翻譯為”出租车”’以達到更完整的 翻譯功能。 請參照圖5並搭配上述,依本發明較佳實施例之客製 1325546 報表文件產生方法係與一資料庫2搭配應用,資料庫2包 含有至少一屬性資料檔21,且具有複數個預存程序22, 此客製報表文件產生方法包括有以下步驟: 首先於步驟S1,係可由使用者依據預存程序22將資 料庫2中之屬性資料檔21取出。本實施例中,係於使用 者操作報表文件產生器而欲將屬性資料檔21取出時,藉 由一擷取模組11而將屬性資料檔21由資料庫2中取出。 φ 接著於步驟S2,建立一電子報表文件3,而電子報表 文件3係可為例如Excel格式之電子報表文件3。本實施 例中,係可由例如C# (C sharp)等程式建立電子報表文件 3,或是藉由呼叫Word與Excel的VBA物件以建立電子 報表文件3。 最後於步驟S3,將屬性資料檔21之内容填入電子報 ' 表文件3中。本實施例中,屬性資料檔21之内容係包括 有至少一屬性資料211,而屬性資料211更具有一欄位名 • 稱參數P卜一資料型態參數P2、一主鍵參數P3及一註解 參數P4等各項參數,則使用者即可於電子報表文件3中 - 看到其中的屬性資料211。 .本實施例中,使用者除了可藉由電子報表文件3的建 立而看到屬性資料檔21外,更可進一步修改填入電子報 表文件3中之屬性資料檔21的内容,並且可再利用資料 庫2之預存程序22,並依據修改後之電子報表文件3中之 屬性資料檔21’的内容來更新資料庫2中的屬性資料檔21。 而除了上述之外,本發明較佳實施例之客製報表文件 1325546 產生方法,更可將填入電子報表文件3中之屬性資料檔21 的内容,由列印設備4列印成書面文件。 另外,爲了方便更多語言的使用者,本實施例中,更 可將填入電子報表文件.3中之屬性資料檔21的内容執行 一語言翻譯動作,例如為將繁體中文之屬性資料檔翻譯成 簡體中文之屬性資料檔、作英文與中文之語系轉換,以及 語意轉換,例如將”計程車”翻譯為”出租车”,以達到更完 • 整的翻譯功能。 綜上所述,依本發明之具客製功能之報表文件產生器 及產生方法,係利用擷取模組並依據資料庫中的預存程序 而將原本使用者無法存取的屬性資料檔取出,而使用者則 可以看到包括註解欄位的各項參數,而可以更了解各攔位 的作用,以方便使用者可以正確的填入各項參數或資料。 除此之外,更可將屬性資料檔之内容做語言的翻譯,以因 應目前多元化的使用環境,而適合更多國家的使用,且若 * 有需要,更可將屬性資料檔之内容列印成書面文件,大大 的提升資料庫使用的方便性。另外,當設計者或管理者要 修改資料庫的内容,不需逐一筆資料來修改,亦可將其轉 換成電子報表文件後,一次修改完後再更新資料庫即可方 便的修改屬性資料檔的内容。 以上所述僅為舉例性,而非為限制性者。任何未脫離 本發明之精神與範疇,而對其進行之等效修改或變更,均 應包含於後附之申請專利範圍中。 1325546 【圖式簡單說明】 圖1A與1B為示意圖,顯示習知設計者所使用與使用 者所觀察到之資料庫晝面; - 圖2為一示意圖,顯示依本發明較佳實施例之具客製 功能之報表文件產生器之一示意圖; 圖3為一示意圖,顯示依本發明較佳實施例之報表文 件之一示意圖; I 圖4為一示意圖,顯示依本發明較佳實施例之具客製 功能之報表文件產生器之另一示意圖;以及 圖5為一流程圖,顯示依本發明較佳實施例之客製報 表文件產生方法。 ' 元件符號說明: • 11 擷取模組 12 報表建立模組 參 13 修改模組 14 更新模組 15 列印模組 16 翻譯模組 2 資料庫 21 屬性資料檔 21’ 修改後之屬性資料檔 211 屬性資料 預存程序 11 22 1325546 3 電子報表文件 4 列印設備 PI 欄位名稱參數 P2 資料型態參數 P3 主鍵參數 P4 註解參數 Vll 名稱搁位. V12 資料型態棚位 V13 空白攔位 V14 註解欄位 D1 資料 SI 〜S3 客製報表文件產生流程1325546 IX. Description of the invention: [Technical field to which the invention pertains] The present invention relates to a method for generating a report file, and more particularly to a custom report file generator and a method for generating the same. m [Prior Art] The development of digital technology with the 'many data is gradually saved in digital order, making the data more convenient and long-term preservation = method and time. However, when there is more and more information, it is necessary to have a set; the system manages the data and maintains the data, so there is a database. The establishment of the database is generally designed by the database designer to be based on the application occasion, and the data required by the user is pre-built in the database for the user to conveniently query. Please refer to FIG. 1A. In the past, when designing a database, the designer usually defines fields such as name block VII, data type field V12, blank block vi3, and note block V14. . The data type field V12 defines the format (such as characters or numbers) that the user needs to input, and the blank block V13 defines whether this field can be blank 'to maintain the stability of the system, and the annotation block Bit V14 is convenient for § ten to understand the function of this position. Referring again to Figure 1B, however, only the name field VII can be seen when the user is using the database. For the average user, it is difficult to know what format parameters or materials need to be filled in each field, and the effect of each block is not well understood, thus causing inconvenience in use. 1325546 In addition, when the designer needs to modify the contents of the database, it must be added to the data to be modified (for example, the data D1 in Fig. 1A), and the whole data is deleted and added, which is a lot of problems for the designer or the manager. Inconvenient and time consuming. Therefore, how to make the database more humane and more convenient for the operation of general users, database designers or managers is one of the topics to be improved in today's industry where every second counts. SUMMARY OF THE INVENTION In view of the above problems, it is an object of the present invention to provide a function that allows a user to more clearly understand the fields in a database used to facilitate input or query of various materials or parameters. Therefore, in order to achieve the above objective, the report file generator having the customized function according to the present invention comprises a capture module and a report creation module, and is applied with a database, and the database includes at least one attribute. Data file, and has a number of stored procedures. The capture module extracts the attribute data file according to the pre-stored program of the database, and the report creation module establishes an electronic report file, and fills the content of the attribute data file into the electronic report file. In addition, in order to achieve the above object, the method for generating a customized report file according to the present invention is applied in conjunction with a database, the database includes at least one attribute data file, and has a plurality of pre-stored programs, and the generating method comprises the following steps: According to the pre-stored program, the attribute data file is taken out, and then an electronic report file is created. Finally, the content of the attribute data file is filled in the electronic report file. The parameter 'can be more aware of the role of each field = the position of the palm bit is indeed filled in the parameters or L users can be positive [implementation] custom system =: = = _ good example of the reference Symbol =: The generation method, in which the same component report contains :::: real two guests:. The report with the custom function has a plurality of pre-stored sequences, at least one attribute data file (metadata) 21, and the capture module u system 1 data file 21 is taken out, like the pre-stored program 22 of the Beckham library 2, and the attribute piece 3 is (For example, an Exeei report creation module 12 creates an electronic report file and fills in an electronic report file file), and the content data file 21 of the attribute data file 21 is in the middle & The attribute data 211 further includes, for example, at least one attribute data 211, and the genus P2, a main parameter ^; the parameter P1, a data type parameter such as the attribute data 211 # ° main solution parameter P4. In this embodiment, the example position parameter P1 can be Name; the data type 7 1325546 • The state parameter P2 can be varcl^ar (character); the primary key parameter P3 represents the meaning when the primary key parameter P3 is When setting (for example, when setting to 1), when using the database 2, the user must fill in the information in the attribute data 211 without being blank; the annotation parameter P4 can be filled in the meaning represented by the attribute data 211, for example, For the name of the teaching material, the representative of the attribute data 211 represents the user to fill in the name of the teaching material, of course, the content can be changed according to the needs. As shown in FIG. 4, the report file generator with a custom function of the preferred embodiment of the present invention may further include a modification module 13, an update module 14, a print module 15, and a translation module. 16. The modification module 13 is configured to modify the content of the attribute data file 21 filled in the electronic report file 3, so as to modify the parameters in the attribute data 211 as described above; the update module 14 utilizes the stored program. 22, and updating the attribute data file 21 in the database 2 according to the content of the attribute data file 21' in the modified electronic report file 3; the printing module 15 is by a printing device 4 (for example, a printing table) The electronic report file 3 filled with the content of the attribute data file 21 is printed as a written document; the translation module 16 executes the language for the content of the attribute data structure 21 recorded in the electronic report file -3 Translation, for example, to translate the attribute data files of Traditional Chinese into Simplified Chinese attribute data files, or to convert and translate language versions such as English and Chinese. In the translation, in addition to the direct translation of the font, you can also perform a semantic conversion, such as translating a "taxi" into a "taxi" to achieve a more complete translation function. Referring to FIG. 5 and the foregoing, the method for generating a report file of the 1325546 according to the preferred embodiment of the present invention is applied in combination with a database 2, the database 2 includes at least one attribute data file 21, and has a plurality of stored programs. 22, the method for generating the customized report file includes the following steps: First, in step S1, the user can take out the attribute data file 21 in the database 2 according to the pre-stored program 22. In this embodiment, when the user operates the report file generator and wants to take out the attribute data file 21, the attribute data file 21 is taken out from the database 2 by a capture module 11. φ Next, in step S2, an electronic report file 3 is created, and the electronic report file 3 can be an electronic report file 3 such as an Excel format. In this embodiment, the electronic report file 3 can be created by a program such as C# (C sharp), or by calling a VBA object of Word and Excel to create an electronic report file 3. Finally, in step S3, the content of the attribute data file 21 is filled in the electronic message 'table file 3. In this embodiment, the content of the attribute data file 21 includes at least one attribute data 211, and the attribute data 211 has a field name, a parameter P, a data type parameter P2, a primary key parameter P3, and an annotation parameter. For each parameter such as P4, the user can see the attribute data 211 in the electronic report file 3. In this embodiment, the user can further modify the content of the attribute data file 21 filled in the electronic report file 3, and can be reused, in addition to the attribute data file 21 which can be seen by the establishment of the electronic report file 3. The stored program 22 of the database 2 updates the attribute data file 21 in the database 2 according to the content of the attribute data file 21' in the modified electronic report file 3. In addition to the above, the method for generating the customized report file 1325546 of the preferred embodiment of the present invention can further print the contents of the attribute data file 21 filled in the electronic report file 3 by the printing device 4 into a written file. In addition, in order to facilitate users of more languages, in this embodiment, the content of the attribute data file 21 filled in the electronic report file .3 can be further subjected to a language translation action, for example, to translate the attribute data file of the traditional Chinese language. It is into the attribute data file of Simplified Chinese, the conversion of English and Chinese language, and the semantic conversion. For example, the “Taxi” is translated into “Taxi” to achieve a more complete translation function. In summary, the report file generator and the generating method with the customized function according to the present invention utilize the capturing module and extract the attribute data file that the original user cannot access according to the stored program in the database. The user can see the parameters including the comment field, and can better understand the role of each block, so that the user can correctly fill in various parameters or data. In addition, the content of the attribute data file can be translated into the language to suit the use of more countries in response to the current diversified use environment, and if there is a need, the content of the attribute data file can be listed. Printed in written documents, greatly improving the convenience of the use of the database. In addition, when the designer or manager wants to modify the contents of the database, it does not need to modify the data one by one, or convert it into an electronic report file, and then modify the database after a modification to easily modify the attribute data file. Content. The above is intended to be illustrative only and not limiting. Any equivalent modifications or alterations to the spirit and scope of the present invention are intended to be included in the scope of the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1A and FIG. 1B are schematic diagrams showing the database used by a conventional designer and viewed by a user; FIG. 2 is a schematic view showing a preferred embodiment of the present invention. FIG. 3 is a schematic diagram showing one of the report files according to the preferred embodiment of the present invention; FIG. 4 is a schematic view showing a preferred embodiment of the present invention. Another schematic diagram of a report file generator for a custom function; and FIG. 5 is a flow chart showing a method for generating a customized report file in accordance with a preferred embodiment of the present invention. 'Component symbol description: • 11 capture module 12 report creation module reference 13 modification module 14 update module 15 print module 16 translation module 2 database 21 attribute data file 21' modified attribute data file 211 Attribute data storage program 11 22 1325546 3 Electronic report file 4 Print device PI Field name parameter P2 Data type parameter P3 Primary key parameter P4 Comment parameter Vll Name position. V12 Data type shed V13 Blank block V14 Comment field D1 data SI ~ S3 custom report file generation process
1212