Count on string

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Hello

I have a field where the user can select multiple items

Example:

Question: Disability
Choices: the field is a multiple select (they can select all 3 at the same time if needed)
    Vision
    Hearing
    Speech


The value comes back as a string below
&Vision&
or
&Vision&Hearing&Speech&
or
&Hearing&Speech&
etc..

I want to be able to count how many times each item from the list was selected

How can I do this?




Edited by sanchezgmc06 - 04 Nov 2016 at 1:24pm
create 3 Running Totals, each with an evaluate formula using a instring or like condition.
example:
RT name = VisionCount
Field to Summarize = PK as a counter or the Question
Type of summary = Count (distinct count if duplicates need to be handled and you can use the appropriate PK)
Evaluate= use a formula
table.answer like '*vision*'
reset = never (unless you need group values)
Field to evaluate = PK or the question field