简体   繁体   English

如何限制水晶报表中子报表图形的过滤器?

[英]How to limit filter for sub report graph in crystal report..?

I'm new to crystal reports and I'm using crystal report 11. I have created a crystal report with a sub report and that sub report filtered by 2 user parameters named “EMP_NAME” and “EVALUATION_YEAR”. 我是Crystal报表的新手,正在使用Crystal报表11。我创建了一个Crystal报表,其中包含一个子报表,并且该子报表由2个名为“ EMP_NAME”和“ EVALUATION_YEAR”的用户参数过滤。 Within the sub report I insert a group and in group footer I insert a chart. 在子报表中,我插入一个组,并在组页脚中插入一个图表。 That chart filtered from above 2 user parameters and from group parameter. 该图表是从以上两个用户参数和组参数中筛选出来的。

The problem is I need to filter my sub report from “EMP_NAME” and “EVALUATION_YEAR” while filtering my chart only from “EMP_NAME” and GROUP PARAMETER. 问题是我需要从“ EMP_NAME”和“ EVALUATION_YEAR”中过滤子报表,而仅从“ EMP_NAME”和“ GROUP PARAMETER”中过滤图表。

Is there any way to do this? 有什么办法吗?

Thank you. 谢谢。

Requirements: 要求:

  • subreport displays one employee 子报表显示一名员工
  • subreport displays one year's of employee data 子报表显示一年的员工数据
  • subreport includes a graph of all years' of employee data 子报表包括所有年份的员工数据图

Solution: 解:

  • Create an {?Employee Name} parameter in the the main report; 在主报表中创建一个{?Employee Name}参数; link it to {TABLE.EMP_NAME} in the subreport 将其链接到子报表中的{TABLE.EMP_NAME}
  • Create an {?Evaluation Year} parameter in the main report; 在主报告中创建一个{?Evaluation Year}参数; create an {?Evaluation Year} parameter in the sub-report; 在子报表中创建一个{?Evaluation Year}参数; link two parameter fields; 链接两个参数字段; DO NOT LINK TO DATA. 不要链接到数据。
  • Create a graph in the sub-report that will display all years' data (for said employee); 在子报表中创建一个图表,以显示所有年份的数据(针对该员工); place in header section 放在header部分
  • In the sub-report, insert a group on EVALUATION_YEAR ; 在子报表中,在EVALUATION_YEAR上插入一个组; suppress footer; 压制页脚; create conditional formula to suppress header if {EVALUATION_YEAR}<>{?Evaluation Year} ; 如果{EVALUATION_YEAR}<>{?Evaluation Year} ,则创建条件公式以抑制标题; suppress details section. 取消details部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM