根据值隐藏/显示报告字段 [英] Hiding/showing report field based on values

查看:112
本文介绍了根据值隐藏/显示报告字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个非常简单的查询,但是我对此有一个整体的认识.

this is a really simple query but I have a total mental block with it.

我正在修改客户帐户对帐单"报告,并且我们有两个发票ID"字段,如果另一个字段中有值,我想隐藏其中一个.例如;

I am modifying the Customer Account Statement report, and we have two Invoice ID Fields, I want to hide one if there is a value in the other. For example;

If(custTrans.InvoiceID_1 != '')
{
    return CustTrans.InvoiceID_1
}

else return InvoiceID_2;

我知道这将以获取方法"进行,但我认为并非如此,我尝试了几种方法来执行此更改,但没有运气,将不胜感激.

I understand this would be carried out in Fetch Method, but I believe this is not the case, I have tried several ways of carrying out this change but have had no luck, any assistance would be appreciated.

推荐答案

好吧,一种方法是使用报表字段的visible属性.

Well, one way is to use the visible attribute of the report field.

虽然这在列表中不能很好地工作,但是在这里最好使用两种显示方法:

This will not work nice in a list though, here you would be better off with two display methods:

display InvoiceId invoiceId_1()
{
     return this.InvoiceId_1 ? this.InvoiceId_1 : this.InvoiceId_2;
}    
display InvoiceId invoiceId_2()
{
     return this.InvoiceId_1 ? this.InvoiceId_2 : '';
}

这篇关于根据值隐藏/显示报告字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆