【 tulaoshi.com - 办公软件 】
在报表的统计过程中,提取上月数据是非常的需求,本文用一个销售月报的例子来说明如何自动提取上月数据。
一、问题
有一个销售公司,需要用Excel服务器管理销售月报:
销售月报
年 月 填报日期

上月金额需要从上月的销售月报中提取。其余字段自己填写。
二、用Excel服务器2004实现
1.建立模版
(1)登录Excel服务器

(2)点击菜单“模版”,选择“新建模版”

(3)点击“确定”

注意:报表编号、报表名称不要重复。
(4)点击“确定”,Excel打开一个新工作表,在上面画出“销售月报”的格式:

画好后,保存。
(5)定义单一数据项

注意:引用上月数据时,需要三个字段:年、月、填报日期,特别时填报日期应当在年、月之中。
(6)定义重复数据项

(7)定义表间公式

将报表自身的数据项选择到数据源中:

点击确定:

点击“筛选条件”:

注意:条件中的“销售月报2_主表.填报日期 介于 上月(本报表.Sheet1:年,本报表.Sheet1:月)”意思指从上月报表中提取。
“销售月报2_明细.产品 = 本报表.Sheet1:产品”意思是提取报表上产品的上月金额。
点击“确定”,回到表间公式界面,再点击“充填方式”:

因为产品需要和表上的产品一一对应,因此,操作选择“按行(列)匹配”。
上月金额的“操作”选择“填入值”方式。
完整的表间公式:

2.填报:
(1)点击“报表”,选择“填报”:

(2)点击“销售月报2”

填写完,点击“保存”:

点击“是”:

应用表间公式提取:

保存,完成了2月份的月报。
三、结束语
本文仅介绍了