Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Crystal报告公式中出现错误_C#_Asp.net_Reporting Services_Crystal Reports_Report - Fatal编程技术网

C# Crystal报告公式中出现错误

C# Crystal报告公式中出现错误,c#,asp.net,reporting-services,crystal-reports,report,C#,Asp.net,Reporting Services,Crystal Reports,Report,目前,我有一个公式字段,用于计算特定字段的和。现在我想对该字段执行条件。仅当SeatNo列不为空时,我才需要AmountPending列的和 if {DataTable1.SeatNo != ""} then Sum ({DataTable1.AmountPending}) else 试试这个: if totext({DataTable1.SeatNo}) <> '' then Sum ({DataTable1.AmountPending}) if-totext({D

目前,我有一个公式字段,用于计算特定字段的和。现在我想对该字段执行条件。仅当SeatNo列不为空时,我才需要AmountPending列的和

if {DataTable1.SeatNo != ""} 
then Sum ({DataTable1.AmountPending})
else
试试这个:

if totext({DataTable1.SeatNo}) <> '' 

then 
  Sum ({DataTable1.AmountPending})
if-totext({DataTable1.SeatNo})'
然后
总和({DataTable1.AmountPending})
如果{DataTable1.SeatNo}”,则求和({DataTable1.AmountPending}),否则什么也不做;
If Not(Isnull({DataTable1.SeatNo})) Then
  Sum ({DataTable1.AmountPending})
Else
  0