cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Parameter Question

Former Member
0 Kudos

Hi

I have a parameter 'Status'. I would like to link it to multiple fields in a table.

E.g. Invoice is a boolean field, Appeared is another boolean field.

I am stuck on how to link this is Crystal Reports.

The only thing I can think of is to use formulas. However I cannot seem to find an example to do this.,

Thanks in advance

Peter

Accepted Solutions (0)

Answers (2)

Answers (2)

DellSC
Active Contributor
0 Kudos

If I understand you correctly, you'll need a formula like this in the Select Expert:

(

     ({?Status} = 'Invoice' and {MyTable.Invoice})

     OR

     ({?Status} = 'Appeared' and {MyTable.Appeared})

     ...

)

This is what the formula will look like if the fields are a true Boolean type in the database, but most databases don't have a field type of Boolean available.  So, if the fields in the database are Bit fields (1 or 0) you would do something like this instead of just using the field after "and":

{MyTable.Invoice} = 1

If the fieldtype is string, you would use the string values instead.

-Dell

Former Member
0 Kudos

Thanks for the replies.

I solved it by using a case statement in the select formula.

Something like this:

select (tag )
  case 'First Value': {table1.field3}
  case 'Second Value': {table4.field9}
  default: 'Unknown';

abhilash_kumar
Active Contributor
0 Kudos

Hi Peter,

Could you provide a little more information please?

Parameters are usually used in the Selection Formula to 'filter' records.

-Abhilash