Skip to Content
0
Former Member
Apr 08, 2009 at 08:21 PM

Crystal Reports 8.5 Multi-Selection Formulas

599 Views

Let me start by saying that I am fairly new to Crystal Reports design, so I appreciate your patience as I try to describe my issue to you.

I am using Crystal Reports 8.5 with an Oracle database. The database contains a field that I refer to as a multi-selection field, meaning that end-users have the ability to select zero, one, or all values available to them in that field.

I am designing a Crystal Report which has a checkbox for each of the selection values within the multi-selection field. So, if the end-user selects three of the values in that field, then three checkboxes appear checked, while all the others checkboxes remain empty. I have no problem getting the checkboxes to appear; that's not the issue.

I have tried using direct table linking and views, subreports, formulas and running totals in a number of different combinations,

to no avail. The results have been mixed; most of the time, only one of the values gets a checked box, while all the other checkboxes are blank. Other times (with some of the subreports) it returns a full set of checkboxes with only one box checked, for each selection value that is chosen in the record.

My basic formula for the field looks like the following, and the formula is repeated for each checkbox (country).

if {TW_V_COUNTRY.S_VALUE} = "Japan" then chr(253) else chr(168)

The closest I've gotten to this report working correctly is when I link an alias of the view for each country. If I have a view for two countries and select those two values in a record, both checkboxes appear checked. However, if I add more views for additional countries and select those values within the record, only one checkbox appears checked.

Has anyone ever done something like this successfully? I'd appreciate any help I can get. Thank you in advance.