在資料庫應用系統中,報表的製作與產生是很重要的工作。本論文探討報表製作與產生的過程中,巢狀式報表(nested report)所需的格式化規則(formatting rule)。一份巢狀式報表包含了巢狀式的表格結構,因此巢狀式報表在設定格式時必須考慮其階層結構,才能充分展現巢狀的效果。本論文提出一套巢狀式報表專屬的報表格式化規則,使用者可以先指定報表的階層,再指定該階層中的表格、行、列,或是儲存格,以兩軸交叉定位的方式來指定作用範圍,再針對作用範圍套用特定的格式,對報表的內容設定字型、顏色等等屬性,因此可以充分發揮巢狀式報表的特色,展現巢狀的效果。本論文並將巢狀式報表的格式化規則實作在表格呈現系統上,擴充表格呈現系統的格式化功能,讓報表設計者能快速的製作各種輸出格式(含HTML、PDF與XML)的巢狀式報表。
Report generation is a very important task for database application systems. In this thesis, we study the formatting rules for nested reports during the report generation process. A nested report is a report consists of nested tables. When a nested report is formatted, one must take the structure of the report into account so that the effects of nesting can be fully expressed. In this thesis, we propose a set of formatting rules for nested reports. With our formatting rules, one assigns an active scope to be formatted and then apply formatting attributes (e.g., fonts and colors) for the members of the active scope. An active scope is assigned by selecting the nested level and then the table, column, row, or cell of this particular level. Thus, the nested structure of reports can be fully explored by our formatting rules. We implement our formatting rules in the Table Presentation System to extend its formatting functionality. Our implementation enables report designers to develop nested reports quickly for various kinds of output formats including HTML, PDF, and XML.