0

我正在构建一个子报表,并有两个表,我使用其中一个字段,每个字段都包含一个电话号码。

原始编号 {TABLE1.ORG}

临时编号 {TABLE2.TEM}

我想要的是:

如果 {TABLE2.TEM} 不为空,则隐藏 {TABLE1.ORG},否则显示 {TABLE1.ORG}

我尝试将上述内容用作公式,但它也不起作用因为这两个字段来自两个不同的表,如果在设计模式下将它们彼此相邻放置(没有任何公式或抑制):

{TABLE1.ORG} {TABLE2.TEM}

...我在预览模式下在不同的行上看到它们:

                 +971 4 321321321

+971 4 123123123

也许是因为公式从同一行读取记录和评估,我想这就是上面无法正常工作的原因。

4

1 回答 1

0

It's not obvious why the two fields are appearing on different lines in preview mode, but it's unlikely to be because they are from different tables - it's more likely to be because there isn't enough room in the layout for them both to display in one line, and so they are growing to a size that canb be displayed.

To conditionally suppress {TABLE1.ORG} based on whether the other field is not null:

  • right-click on {TABLE1.ORG} and select Format Field...
  • in the Common tab within the Format Editor dialog, click on the conditional suppress formula button x-2 and enter the formula not IsNull ({TABLE2.TEM}) in the Format Formula Editor.
  • click Save and close to exit from the Format Formula Editor, then click OK to exit the Format Editor dialog.

If you now preview the report, you should find that {TABLE1.ORG} is suppressed where {TABLE2.TEM} is not null.

Note that if you make display of both fields conditional on whether the other is null, then both will be suppressed where neither is null.

于 2012-01-06T16:11:54.470 回答