学习C#开源报表组件Seal Report(38:Seal Report Designer界面布局-34)

  Seal Report Designer软件左侧面板的Outputs节点用于定义报表的输出格式和保存方式,支持将报表导出为PDF、Excel、CSV、JSON等多种格式,同时支持将输出文件保存到本地文件夹或通过邮件发送给特定人员。
  启动Seal Report Designer,在左侧面板的Outputs节点上点右键,支持创建多种类型的报表输出方式,如下图所示:

  以创建Output for Folder Device为例,该输出类型将指定格式的报表文件输出到指定的本地文件夹,其属性如下图所示:

  Output device属性:记录当前输出方式类型,不可修改。

  View name属性:配置输出报表使用的视图,从Views节点内选择;

  Cancel generation if no records属性:如果视图数据源的查询结果为空则不输出报表;

  Pre-generation script属性:维护输出报表前执行的Razor脚本,如果脚本返回值为0,则取消输出报表;

  Post-generation script属性:维护输出报表后执行的Razor脚本;

  Custom view parameters属性 :维护视图属性,如下图所示,这些属性与View节点的Template configuration分组中的属性相同,之前的文章已经介绍过,不再赘述,其中Report format属性可以设置报表输出格式,包括HTML、PDF、CSV等;

  Folder path属性:设置报表输出路径,支持在路径中添加%SEALREPOSITORY%关键词以使用报表库根目录;

  File name属性:设置报表输出名称,支持添加%SEALREPORTDISPLAYNAME% 、日期等关键词格式化输出名称;

  Zip result属性:值为True,则将报表输出为压缩文件;

  Zip password属性:设置压缩文件密码;

  Use Custom restrictions属性:值为True,则输出报表时支持自定义筛选;

  Custom restrictions属性:设置自定义筛选条件,默认加载Models节点下定义的筛选条件,也支持添加、删除筛选条件;

  User name属性:值不为空,则以指定用户的安全上下文输出报表(即模拟用户权限);

  User group属性:值不为空,则以指定用户组的安全上下文输出报表;

  Culture属性:设置输出报表时所使用的区域性(Culture);

  Public execution属性:针对Web报表服务器,值为True,所有具有报表执行权限的用户都可以执行报表输出操作,值为False,则只有所有者(user owner)才能执行报表输出操作;

  Public edit属性:针对Web报表服务器,值为True,所有具有调度权限的用户都可以修改输出配置及调度计划,值为False,则只有所有者(user owner)才能修改。

  Seal Report Designer软件自带的示例中包括Output for Folder Device的使用示例,以07-Outputs and schedules.srex文件为例(位于Samples文件夹内),该文件的Output节点下创建了多种输出格式的本地文件夹输出节点。
  下图中Output节点下总共包含5类输出设置,其中4个节点采用Output for Folder Device,也即输出到本地文件夹,分别生成CSV、Excel、HTML、PDF格式的报表文件,其中CSV格式的报表文件设置为输出到Samples文件夹,使用视图名称作为报表文件名,点击Seal Report Designer软件上面的"Execute Output"按钮,就会在Samples文件夹下生成对应的报表文件。

参考文献:

1https://github.com/ariacom/Seal-Report

2https://sealreport.org/

3https://sealreport.org/demo

4https://sealreport.org/forum/

5https://github.com/ariacom/Seal-Report/releases

6https://www.cnblogs.com/Leo_wl/p/7716582.html

7https://sealreport.org/Help/html/26c7ae63-9b83-dc1d-b5d0-00a18021be41.htm

8https://sealreport.org/Reports

相关推荐
gc_229915 天前
学习C#开源报表组件Seal Report(37:Seal Report Designer界面布局-33)
seal report
gc_229918 天前
学习C#开源报表组件Seal Report(33:Seal Report Designer界面布局-29)
seal report
gc_22991 个月前
学习C#开源报表组件Seal Report(30:Seal Report Designer界面布局-26)
seal report
gc_22991 个月前
学习C#开源报表组件Seal Report(28:Seal Report Designer界面布局-24)
seal report
gc_22991 个月前
学习C#开源报表组件Seal Report(26:Seal Report Designer界面布局-22)
seal report
gc_22992 个月前
学习C#开源报表组件Seal Report(24:Seal Report Designer界面布局-20)
seal report
gc_22992 个月前
学习C#开源报表组件Seal Report(23:Seal Report Designer界面布局-19)
seal report
gc_22992 个月前
学习C#开源报表组件Seal Report(20:Seal Report Designer界面布局-16)
seal report
gc_22992 个月前
学习C#开源报表组件Seal Report(17:Seal Report Designer界面布局-13)
seal report