Wahab
Wahab

Reputation: 61

Conditional Sum in Crystal Reports?

I know that my question is very basic but I am new to Crystal Reports, therefore, I stuck in one of crystal report formula.i will be very thankful if someone helps me that what formula should I use for the following SQL query to return the sum of selected rows:
select sum(credithr) from transcript_detail_pr where checkid is null
I am using the below statement in the formula
if isnull({Transcript_Detail_Pr.CheckId})= true then sum({Transcript_Detail_Pr.CreditHr})

Upvotes: 1

Views: 450

Answers (1)

Fahmi
Fahmi

Reputation: 37473

Try below:

if isnull({Transcript_Detail_Pr.CheckId})
then 
sum({Transcript_Detail_Pr.CreditHr})
else 
0

Upvotes: 1

Related Questions