2014-01-29 74 views
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; 
); 

但它只适用于第一条件,如果条件。它不适用于这两种情况。 我想这样做,按第一个参数过滤(过滤记录) - >按第二个参数过滤。

谢谢你, Sameera

+1

要添加到个人的指令,而不是单一的,复合指令。 – craig

回答

2

正确的,记录选择配方语法您的需求:

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

代码转储不是答案。请更新您的答案,以包含此代码的内容说明,与原始来源有什么不同,以及这些更改如何解决问题。 – Charles