Page 1 of 1

Use different field when business object ist null

Posted: Thu Feb 20, 2014 3:19 pm
by HowieD
Hi All,
in my Report I want to print a different field when a business object is null.
Here is a sample (pseudo) code:

Code: Select all

[Address].BankInfo == null ? [Address].IBAN : [Address].BankInfo.IBAN
But the code doesn't work in the Report.

How can I achive this?

Best Regards!
HowieD

Re: Use different field when business object ist null

Posted: Fri Feb 21, 2014 6:43 am
by Alex K.
Hello,

Please try to use the following code

Code: Select all

Address["BankInfo"] == DBNull.Value ? [Address].IBAN : [Address].BankInfo.IBAN
Thank you.

Re: Use different field when business object ist null

Posted: Fri Feb 21, 2014 12:32 pm
by HowieD
Hi Aleksey,
unfortunately your code doesn't work here.
Could I pass you a copy (an when how) of the Report so that you can check it on your side?

Best Regards
HowieD

Re: Use different field when business object ist null

Posted: Fri Feb 21, 2014 2:15 pm
by HighAley
Hello.

Please, send us a sample project which reproduces the issue for analysis.

Thank you.