2013-07-29 2 views
0

"수량 또는 통화 금액이 필요합니다"두 열 수량과 단가를 곱하여 크리스탈 보고서에 수식을 구현했습니다. 둘 다 십진 형식이지만 쿼리가 일부 값을 반환하면 아무런 예외도없고 질의가 아무런 값을 반환하지 않을 때 숫자 나 통화량 같은 예외가 발생합니다.
공식은 여기
오류 크리스탈 보고서의 공식 편집기에서

if isNULL({dtDealerStockReport.Qty})=True or isNULL({dtDealerStockReport.UnitPrice})=true 
    then 
     0 
    else 

    {dtDealerStockReport.Qty}*CDBL({dtDealerStockReport.UnitPrice}) 

답변

1

문제입니다 양이 결정 보고서가 null 취하고 값을 반환하지 않을 때입니다. 따라서 아래 수식을 변경하십시오.

if isNULL({dtDealerStockReport.Qty})=True or isNULL({dtDealerStockReport.UnitPrice})=true 
    then 
     0 
    else if (Your conditions) 

    {dtDealerStockReport.Qty}*CDBL({dtDealerStockReport.UnitPrice}) 
else 
0 
관련 문제