May 17, 2005 #1 Brian555 Technical User Apr 29, 2005 20 GB Please help how do I count a number of fields that contain a value greater than zero
May 17, 2005 #2 Turkbear Technical User Mar 22, 2002 8,631 US Hi, You could create a formula that tests each number field - @f1 If {table.field1} > 0 then 1 else 0 Do one like this for each field..Then create 1 more that adds them up: @HowManyMoreThanZero @f1 + @f2 + .... Place these in your report.. and suppress the display of the individual ones.. To Paraphrase:"The Help you get is proportional to the Help you give.." Upvote 0 Downvote
Hi, You could create a formula that tests each number field - @f1 If {table.field1} > 0 then 1 else 0 Do one like this for each field..Then create 1 more that adds them up: @HowManyMoreThanZero @f1 + @f2 + .... Place these in your report.. and suppress the display of the individual ones.. To Paraphrase:"The Help you get is proportional to the Help you give.."
May 17, 2005 #3 synapsevampire Programmer Mar 23, 2002 20,180 US Try posting technical information: Database/connectivity used Example data Expected output Another means might be to use something like: numbervar MyCount:=0; If {Customer.Customer ID} > 1 then MyCount:=MyCount+1; If {Customer.Customer Credit ID} > 1 then MyCount:=MyCount+1; etc... But where are the counts displayed, in a group or a running total in the details, or??? -k Upvote 0 Downvote
Try posting technical information: Database/connectivity used Example data Expected output Another means might be to use something like: numbervar MyCount:=0; If {Customer.Customer ID} > 1 then MyCount:=MyCount+1; If {Customer.Customer Credit ID} > 1 then MyCount:=MyCount+1; etc... But where are the counts displayed, in a group or a running total in the details, or??? -k
May 25, 2005 Thread starter #4 Brian555 Technical User Apr 29, 2005 20 GB Sincere thanks to you both. I have used the suggestion by Turkbear and it has worked. many thanks Snoweyboy Upvote 0 Downvote
Sincere thanks to you both. I have used the suggestion by Turkbear and it has worked. many thanks Snoweyboy