存取数据和定制报表

默认PaperCut NG安装存储数据是在内部的数据库里。对此感兴趣的人,Apache Derby数据库 – 一个公开的数据库源被 IBM 写入和基于他们的DB2 Cloudscape数据库。内部的数据库是非常充沛的,ACID 所允许的范围也都很好。PaperCut NG也拥有使用外在数据库的选项,如:Microsoft的SQL服务器。运行在外在的数据库提供了一些优点,一个能力就是使用第三方报表工具存取数据,如:Crysta报表。对于更多的信息请查看 第十七章, 有关外在的RDBMS的配置部分。

PaperCut NG数据结构是相对简单的并且人们使用Crystal报表或SQL体验提取数据或写定制报表应该没有什么问题。报表开发者应该紧记:

A database schema diagram can be found in the PaperCut NG knowledge base located at Database Schema Diagrams.

纯文本的打印日志

除了存储打印日志信息在数据库里外,实时的、纯文本的日志也被写到目录里:

            [app-path]/server/logs/print-logs
            

日志文件在划定的表格里之外,每天还要创建新的日志。文件的命名用 printlog_yyyy_mm_dd.log 并且文件要存档 30天。表格里划定的文件可以很容易被导入到诸如:Microsoft Excel、Microsoft 存取或其它的数据库程序里。

FieldDescription

Field 1

Date in format yyyy-MM-dd\th:mm:ss a/p

Field 2

Server Name

Field 3

Printer Name

Field 4

User who printed the document

Field 5

Account charged (usually the user's personal account but could be a shared account)

Field 6

Client/Workstation Name

Field 7

Document name

Field 8

Total number of pages

Field 9

Total number of color pages

Field 10

Number of copies (this has already been used to calculate the total pages).

Field 11

Cost

Field 12

Duplex status

Field 13

Grayscale status (Color mode)

Field 14

Paper Size (e.g. Letter, A4)

Field 15

Paper Height in Millimetres (divide by 24.5 for inches)

Field 16

Paper Width in Millimetres (divide by 24.5 for inches)

Field 17

Print job size in KB

Field 18

Printer Language

表格 15.4. 文本打印日志的文件格式