2012-07-10 70 views
0

我在我的組頁腳中有以下公式,但在顯示0時遇到問題,如果sample_perc爲空;如果#rt_sample_ordered爲空,則此值爲空。如何處理Crystal Reports中的空白字段/變量?

NumberVar sample_perc := {#rt_sample_ordered}%{@sum_of_sample}; 
if (sample_perc>0)then 
    sample_perc 
else 
    0 

如何在sample_perc爲空時打印0?

回答

0
If Isnull({#rt_sample_ordered}) Or Isnull({@sum_of_sample}) Then 
    0 
Else If ({#rt_sample_ordered}%{@sum_of_sample}) > 0 Then 
    sample_perc 
Else 
    0 
+0

我知道它有點奇怪,它沒有工作:( – Thanu 2012-07-12 00:04:17

相關問題