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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count not blank field

Status
Not open for further replies.
Sep 16, 2005
191
US
I have a field that current is blank but user wants to count this field if it is not blank. I use this formula:

If isnull({TB_VIOL.DATE})
then 0
else 1

Problem: when I pull this field into the report, it everything in my report is blank. Please advise.
 
In file->report options make sure you do not have "convert null values to default" checked. Then when you insert a grand total on your formula, choose "sum", NOT "count".

-LB
 
I sorry, I should be more specific. I insert a sum running total of the field and move it to group header #2 not Grand Total. I need the sum to be on the group header #2 row.

Basically, I have to create a report that will give me a summary of each employees with total facility assigne to them and some count field. SO I created two groups.
Group Header #1 is group by dept.
Group Header #2 is group by employee name. All other section is suppress.

I am still learning crystal as I create report. Oh yeah, I am using Crystal 10.
 
You can't use a running total in the group header for this. You should be able to right click on your formula and insert a summary (sum), choosing the group level that you want. This summary can be dragged from the group footer into the group header.

-LB

 
I did as you say but still it the whole report just went blank.. On my Group Header #2 I have the following:
Employee ID
DistinctCount Of @FacilityAssigned
@CountYear
Sum of @TotalEntries
DistinctCount of @Completed


and when I bring in Sum of @DateClear (If isnull({TB_CORE_INSPECTION_VIOL.COMPLIED_ON_DATE})
then 0
else 1)

The whole report just went blank.. If I don't bring this field in, data for the other fields shows up.
 
How do I write the formula so that it checks for null and blank, this way maybe I can capture the null and blank for the Complied_On_Date?

I think the field is blank instead of null.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top