cancel
Showing results for 
Search instead for 
Did you mean: 

Formula with many type in output

Former Member
0 Kudos

Hi,

I work with Crystal Report XI.

I need to have one formula with sometime number and sometime characters in output. It's possible ?

2 separates formulas are not good for me.

It's to export report in Excel with good format.

Have you a solution to help me please ?

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

No. It is not possible to have a formula that can switch data types.

In your case, the solution would be to set it as a string data type because the string data type can display both alpa & numeric character sets.

HTH,

Jason

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Also, consider the following if the numbering format is import, example you want it to be 2 decimals.

Do as Jason suggested to have it as a string, but you can have a formula like:

If Isnumeric(xxx) then

Totext(xxx,2)

else

xxx

In that sense, you can still keep it as 1 formula.