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

Descrete Total column 1

Status
Not open for further replies.

TudorSmith

Programmer
Jan 14, 2002
245
GB
Hi All

I have a report with a column returning values 0 & 1 (Where a task is complete or not). I have set an expression to return "NO" or "YES" accordingly.

Now, in my report footer I would like a field that only counts the number of 1's. If my report shows 6 columns and only 2 have a "1" value, then I'd like a field showing:

Code:
"Total Completed: 2"

Can anyone provide a formula I should use to accomplish this? I tried my best a Basic Script but get an error stating the Special Variable 'Formula' must be assigned:

Here's my code
Code:
Dim i as number
i = 0
If {spu_BBRIS_Snagging_MCSnagging;1.STRESSING_COMPLETED} = 1 Then
    i = i + 1
end if

birklea ~©¿©~ <><
Dim objJedi as Jedi.Knight
Set objJedi[skyWalker].Aniken = FatherOf(useThe.Force(objJedi[skyWalker].luke))
 
Hi,
Perhaps you could place the actual column in the report, suppress its output ( you will still use the Yes/No formula for that)and Insert a GrandTotal summary of that column in the footer...

[profile]
 
Ha! that's exactly how I managed it! I dug about and finally came up with the solution. Thanks for the tip though...have a star :)

birklea ~©¿©~ <><
Dim objJedi as Jedi.Knight
Set objJedi[skyWalker].Aniken = FatherOf(useThe.Force(objJedi[skyWalker].luke))
 
Hi,
Thanks..Finding out yourself is the best way to gain knowledge that stays with you..

[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top