Crystal Reports在记录选择中的条件多次

问题描述 投票:2回答:1

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

参数值是;

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条件。它不适用于这两种情况。

我想让它像,按第一个参数筛选然后(筛选记录) - >按第二个参数筛选。

crystal-reports crystal-reports-xi
1个回答
3
投票

适合您的需求的记录选择公式语法:

(
if {?type} <> "All" then
  {cars_call_log.type} = {?type}
else
  true
)
AND
(
if {?status} <> "All" then
  {cars_call_log.status} = {?status}
else
  true
)
© www.soinside.com 2019 - 2024. All rights reserved.