crystal-reports - Crystal Reports 记录选择中的多个 if 条件

标签 crystal-reports crystal-reports-xi

我想创建一个报告并按以下两个参数对其进行过滤;

参数值为;

Call_type = "All" , "Sale" , "Buy"
and
Call_status = "All" , "Sold" , "Pending" , "None" , "Closed"

我使用了下面的公式;

(
if {?type} <> "All" then
    {cars_call_log.type} = {?type}
else
    true;
);
(
if {?status} <> "All" then
    {cars_call_log.status} = {?status}
else
    true;
);

但它仅适用于第一个 If 条件。它不适用于这两种情况。

我想让它像这样,按第一个参数过滤,然后(过滤记录)--> 按第二个参数过滤。

最佳答案

满足您需求的正确记录选择公式语法:

(
if {?type} <> "All" then
  {cars_call_log.type} = {?type}
else
  true
)
AND
(
if {?status} <> "All" then
  {cars_call_log.status} = {?status}
else
  true
)

关于crystal-reports - Crystal Reports 记录选择中的多个 if 条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21438922/

相关文章:

c# - Crystal 报表在十进制字段中显示######

mysql - 从报表中的两个表查询

sql - 如何将项目添加到联合 SQL View ?

java - eclipse :com. mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链路故障

crystal-reports - 显示参数的描述值

mysql - 如何在一个表中按月与另一年的数据进行比较

mysql - 部署时使用 Crystal 报表部署 clickonce windows 应用程序时出错

crystal-reports - 在 Crystal Reports Basic(vs2008 中内置的一个)中创建一个表?

c# - Crystal Reports MVVM 数据源

crystal-reports - Crystal 报表公式中的上标