jahanzaib  kk
jahanzaib kk

Reputation: 688

Crystal report 208 Formula error

i am working in vs 2010 with crystal report version 2008

The problem i am facing is i have a crystal report in which i have a formula filed

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

The error which i am facing is a number currency or amount is required here

this error is only raise when my query does not return anything but when it return the data it does not raise this error.

so how can i solve it please help me googling for many days .

Upvotes: 0

Views: 272

Answers (1)

Waqar
Waqar

Reputation: 226

Jahanzaib,

You need to modify your formula somewhat like this.

IF({dtDealerStockReport.Qty} == NULL || {dtDealerStockReport.UnitPrice} == NULL )
(
    0;
)
ELSE
(
    {dtDealerStockReport.Qty}*(CDBL({dtDealerStockReport.UnitPrice}));
)

Problem will be solved hopefully,

Upvotes: 1

Related Questions