Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distinct count showing 1 when there is nothing

Status
Not open for further replies.

dev1212

Programmer
May 11, 2010
117
US
Hi guys,

I have a field {Prod.Accountnumber}. I did hierachical grouping on {Prod.branch}. When i am doing distinct count of {Prod.Accountnumber} i am getting all 1's but it should all be 0's.

Please reply ...

Thanks
 
any ideas guys on distinct count?

Distinct count of {Prod.branch} gives me 1 when its Null
 
Try this
Go to File ----> Report Options ------> uncheck Convert Database NULL Values to Default.
 
I've a problem here..
I want to display '$0.0' when there is null of amount.
So, i did check 'convert database null values to default', if i do that then distinct counts are getting messed up.

How to display '$0.0' when the amount is null..?

Any ideas..

I tried to create a text object and wrote '$0.0' and in suppress option of that text object i wrote
"IsNull(Sum({Prod.amount}))=FALSE"

But it isnt working, i cannot use formulas here as its hierarchical summaries and crystal reports doesnt allow you to write hierarchical summary in the formula field..


Please reply with suggestions...


Thanks


 
Replace the amount field with a formula:

if isnull({Prod.amount}) then
0 else
{Prod.amount}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top