您可以在 Crystal Reports 中创建报告模板。
过程
如何创建报告模板:
- 启动 Crystal Reports Designer,然后打开一个批量报告。
- 使用 Crystal Reports Designer“数据库专家”对话框来与
Content Platform Engine 建立连接。
- 在“数据库专家”对话框中,选择 JDBC。
- 确保“连接 URL”正确,然后输入用户名和密码来建立与 Content Platform Engine 的连接。
- 在“数据库专家”中:
- 添加以下 SQL 命令:
Select F.PathName, RCR.ContainmentName, MK.MediaType, MK.DateCreated, MK.Creator from (Markers MK Inner join ReferentialContainmentRelationship RCR on MK.This=RCR.Head) Inner join RMFolder Fon F.This=RCR.Tail where MK.DateCreated >= {?start_date} And MK.DateCreated <= {?end_date} And MK.MediaType = '{?media_type}' And MK.this insubfolder '/{?fileplan_browse}'
- 创建以下五个参数,全部为“字符串”类型:fileplan_browse、start_date、end_date、time_zone 和 media_type。 参数名称必须与 CE 属性模板的符号名称匹配。
- 在 Crystal Reports Designer 中:
- 如果要使用特定的时区显示报告输出的日期/时间字段,请创建类型为“字符串”的 time_zone 参数。 对于显示在(查看器)面板上选项,选择不显示。如果报告模板具有子报告链接,请执行下列操作︰
- 在每一个子报告中添加 time_zone 参数
- 将 ?time_zone 字段添加至要链接至的字段
- 对于 time_zone 字段链接,使用子报告参数字段的 ?time_zone
注意: 从 IBM Enterprise
Records 执行该报告时,将从 IBM Enterprise
Records Web 应用程序传递日期/时间和时区值。报告输出的日期值将使用指定的时区进行格式化。如果要应用从 IBM Enterprise
Records Web 用户界面传递至报告输出的日期字段中的时区,必须定义 time_zone 参数并为报告模板中的日期字段创建公式字段。
- 定义以下“公式”字段:
date = ShiftDateTime (CurrentDateTime, "" ,{?time_zone})
start = ShiftDateTime (DateTime(Left({?start_date},10) + " " + mid
({?start_date},12,8)),"GMT,0" ,{?time_zone})
end = ShiftDateTime (DateTime(Left({?end_date},10) + " " + mid
({?end_date},12,8)),"GMT,0" ,{?time_zone})
DateCreated = ShiftDateTime ({Command.DateCreated},"",{?time_zone})
- 请使用下列“详细信息部分”字段定义“报告 UI”。
Creator: Command.Creator
DateCreated: Command.DateCreated
MediaType: Command.MediaType
@EntityName: Formula EntityName.
- 将此报告保存到 Crystal Reports 安装路径下的 Samples 文件夹中。例如:
C:\Program
Files\Business Objects\BusinessObjects Enterprise 12\Samples\en\Reports\
Detailed Physical Records By Media Type Created.rpt
- 从 Crystal Reports Designer 预览报告。
- 单击刷新为每个参数输入相应值:
表 1. 示例报告参数值 参数 |
值 |
注释 |
fileplan_browse |
Records Management/<FilePlanName> |
|
start_date |
2008-01-01 或
2008-01-01TO7:00:00Z |
检查 Crystal Reports Designer 中日期时间格式的设置 |
end_date |
2008-12-31 或
2008-12-31TO6:59:59Z |
检查 Crystal Reports Designer 中日期时间格式的设置 |
time_zone |
America/Los_Angeles,480 或
America/Los_Angeles,480,DST,-60 |
检查 Crystal Reports Designer 中日期时间格式的设置 |
media_type |
paper |
|
结果
您创建了详细报告模板 Detailed Physical Records By Media Type Created.rpt。
此模板将用于 Base 数据模型归档计划对象库 (FPOS)。如果要将模板用于 DOD 已分类数据模型,那么请将其另存为 Detailed Physical Records By Media Type Created DoDClassified.rpt。
该样本仅创建详细报告。您可以再创建一个摘要报告并将其另存为 Summary Physical Records By Media Type Created.rpt。