i have an RCDL Report in the summation group row, need to get Min value from summation group row exclude 0
i used this expression but it still return 0:
=IIf (
ReportItems!x7s.Value <> 0
AND ReportItems!x7s.Value <= ReportItems!x8s.Value
AND ReportItems!x7s.Value <= ReportItems!x9s.Value
AND ReportItems!x7s.Value <= ReportItems!x10s.Value
AND ReportItems!x7s.Value <= ReportItems!x11s.Value
AND ReportItems!x7s.Value <= ReportItems!x12s.Value , ReportItems!x7s.Value
, (
iif (ReportItems!x8s.Value <> 0
AND ReportItems!x8s.Value <= ReportItems!x7s.Value
AND ReportItems!x8s.Value <= ReportItems!x9s.Value
AND ReportItems!x8s.Value <= ReportItems!x10s.Value
AND ReportItems!x8s.Value <= ReportItems!x11s.Value
AND ReportItems!x8s.Value <= ReportItems!x12s.Value , ReportItems!x8s.Value
, (
iif (ReportItems!x9s.Value <> 0
AND ReportItems!x9s.Value <= ReportItems!x7s.Value
AND ReportItems!x9s.Value <= ReportItems!x8s.Value
AND ReportItems!x9s.Value <= ReportItems!x10s.Value
AND ReportItems!x9s.Value <= ReportItems!x11s.Value
AND ReportItems!x9s.Value <= ReportItems!x12s.Value , ReportItems!x9s.Value
, (
iif (ReportItems!x9s.Value <> 0
AND ReportItems!x10s.Value <= ReportItems!x7s.Value
AND ReportItems!x10s.Value <= ReportItems!x8s.Value
AND ReportItems!x10s.Value <= ReportItems!x9s.Value
AND ReportItems!x10s.Value <= ReportItems!x11s.Value
AND ReportItems!x10s.Value <= ReportItems!x12s.Value , ReportItems!x9s.Value , ReportItems!x11s.Value
)
)
)
)
)
)
)
CodePudding user response:
VB.net Find smallest number except 0
Check the answer on this question. I think this is what you want.
CodePudding user response:
thanks a lot I got the Solution
=IIf (
ReportItems!x7s.Value <> 0 AND ReportItems!x7s.Value <= (iif(ReportItems!x8s.Value = 0 , ReportItems!x7s.Value , ReportItems!x8s.Value )) AND ReportItems!x7s.Value <= (iif(ReportItems!x9s.Value = 0 , ReportItems!x7s.Value , ReportItems!x9s.Value )) AND ReportItems!x7s.Value <= (iif(ReportItems!x10s.Value = 0 , ReportItems!x7s.Value ,ReportItems!x10s.Value )) AND ReportItems!x7s.Value <= (iif(ReportItems!x11s.Value = 0 , ReportItems!x7s.Value ,ReportItems!x11s.Value )) , ReportItems!x7s.Value
, ( iif (ReportItems!x8s.Value <> 0 AND ReportItems!x8s.Value <= (iif(ReportItems!x7s.Value = 0 , ReportItems!x8s.Value , ReportItems!x7s.Value )) AND ReportItems!x8s.Value <= (iif(ReportItems!x9s.Value = 0 , ReportItems!x8s.Value , ReportItems!x9s.Value )) AND ReportItems!x8s.Value <= (iif(ReportItems!x10s.Value = 0 , ReportItems!x8s.Value ,ReportItems!x10s.Value )) AND ReportItems!x8s.Value <= (iif(ReportItems!x11s.Value = 0 , ReportItems!x8s.Value ,ReportItems!x11s.Value )) , ReportItems!x8s.Value
, ( iif (ReportItems!x9s.Value <> 0 AND ReportItems!x9s.Value <= (iif(ReportItems!x7s.Value = 0 , ReportItems!x9s.Value , ReportItems!x7s.Value )) AND ReportItems!x9s.Value <= (iif(ReportItems!x8s.Value = 0 , ReportItems!x9s.Value , ReportItems!x8s.Value )) AND ReportItems!x9s.Value <= (iif(ReportItems!x10s.Value = 0 , ReportItems!x9s.Value ,ReportItems!x10s.Value )) AND ReportItems!x9s.Value <= (iif(ReportItems!x11s.Value = 0 , ReportItems!x9s.Value ,ReportItems!x11s.Value )) , ReportItems!x9s.Value
, (
iif (ReportItems!x10s.Value <> 0
AND ReportItems!x10s.Value <= (iif(ReportItems!x7s.Value = 0 , ReportItems!x10s.Value , ReportItems!x7s.Value ))
AND ReportItems!x10s.Value <= (iif(ReportItems!x8s.Value = 0 , ReportItems!x10s.Value , ReportItems!x8s.Value ))
AND ReportItems!x10s.Value <= (iif(ReportItems!x9s.Value = 0 , ReportItems!x10s.Value ,ReportItems!x9s.Value ))
AND ReportItems!x10s.Value <= (iif(ReportItems!x11s.Value = 0 , ReportItems!x10s.Value ,ReportItems!x11s.Value ))
, ReportItems!x10s.Value , ReportItems!x11s.Value
)
)
)
)
)
)
)