I would like to be able to count the number of records in a report that have a specific string in a field.
My example is I have one field that has Checkout and Copy entries. In my report I have grouped Checkout and Copy, but I haven't figured out how to count the number of records. These Checkout and Copy groups are under a Project grouping in the hiearchy.
If you already are grouping on these items then create a section footer for the category and add a text box control. set the data source to "= count([<name of control>])
where <name of control> is a control in the report detail (it doesn't what it is)
Both "checkout" and "copy" entries are in the same field and I have grouped on that field. It separates checkout and copy in the report, but I still haven't figured out how to count entries for each one individually.
Is there a way to search for a string of text in the count statement?
you may have to resort to putting come code behind the report
declare your global variables (eg SumCheckout, SumCopy)
in the group header event zero your variables
in the group detail event add to the variables
eg if flag=checkout then sumcheckout=sumcheckout+myvalue else sumCopy=sumCopy+myvalue
in the group format event load the contrls on the form
you can expand the totalling to include report totals & other group totals
An alternative is to add a column to the source query which checks to see what type of value it is
CheckOutVal:iif(<logical test to determine if its a checkout>,<value>,null)
CopyValVal:iif(<logical test to determine if its a Copy>,<value>,null)
this could instead be phrased as
CheckOutVal:iif(<logical test to determine if its a checkout>,null,<value>)
and report these fileds in the normal manner
yer pays yer money, yer takes yer choice.....