无法从水晶报告中删除空白区域

时间:2018-01-05 13:39:43

标签: asp.net crystal-reports

我正在尝试从报告中删除由于禁止空字段而创建的空白行。我尝试过多种解决方案,例如

  1. 将所有对象添加到文本对象并选中“Suppress Embaded” 空白字段“
  2. 尝试了不同的公式。 但没有成功。 这是结果的屏幕截图 enter image description here
  3. 这里是添加到报告的字段的屏幕截图 enter image description here

    我试过的公式

    //if({TableGeneric.IsTaxable}="Yes")  then false else true
    NOT(isnull({TableGeneric.IsTaxable}))
    //if {Table1.TaxTypeId} = "" then true
    

    更多我不想为每条记录添加不同的sectin 请告诉我应该做些什么。

1 个答案:

答案 0 :(得分:0)

我们可以做到这一点,但它有点长篇代码:

您需要将逻辑扩展到所有公式,例如:

@Gross Amount公式将如下:

if NOT(isnull({TableGeneric.IsTaxable})) = 'Gross Amount'
then 'Gross Amount'
else if NOT(isnull({TableGeneric.IsTaxable})) = 'VAT/ST'
then 'VAT/ST' 
else if NOT(isnull({TableGeneric.IsTaxable})) = 'Additional VAT/ST'
then 'Additional VAT/ST' 
else if NOT(isnull({TableGeneric.IsTaxable})) = 'Total Including VAT/ST'
then 'Total Including VAT/ST' 
else if NOT(isnull({TableGeneric.IsTaxable})) = 'Fright Charges'
then 'Fright Charges' 
else if NOT(isnull({TableGeneric.IsTaxable})) = 'Discount'
then 'Discount' 
//This formula will display the first row name. Here it will check for all the values one by one and displays the value that satisfies the condition

@Gross Amount value公式将如下:

 if NOT(isnull({TableGeneric.IsTaxable})) = 'Gross Amount'
    then databasefield.value
    else if NOT(isnull({TableGeneric.IsTaxable})) = 'VAT/ST'
    then databasefield.value 
    else if NOT(isnull({TableGeneric.IsTaxable})) = 'Additional VAT/ST'
    then databasefield.value 
    else if NOT(isnull({TableGeneric.IsTaxable})) = 'Total Including VAT/ST'
    then databasefield.value 
    else if NOT(isnull({TableGeneric.IsTaxable})) = 'Fright Charges'
    then databasefield.value 
    else if NOT(isnull({TableGeneric.IsTaxable})) = 'Discount'
    then databasefield.value
    //This formula will display the value of first row name. Here it will check for all the values one by one and displays the value that satisfies the condition

它应该工作..现在没有工具但应该工作。