cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports - Displaying Records which have four or more characters

Former Member
0 Kudos

Hi Guys,

I'm pretty new to Crystal Reports and am having a few problems with what is probably a basic formula!

I am looking to display records within a field which contains four or more characters.

This is how it plays out in my head anyway:

If ({table.field}) is greater than or equal to '****' then display {table.field}

So generally if the field is greater than or equal to four characters (I'm not sure if '****' is the correct way to display this??) then display the said field.

Hopefully someone knows what angle I'm coming from.

Please help! And thanks in advance..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Right click field and select format

Opposite suppress check box click the formula icon and enter

length() < 4

This will suppress field if it has less than 4 characters

Ian

Former Member
0 Kudos

Thanks Ian!

Is there any way that I can now hide the fields which do not display any data as they have less than four characters?

P.S. You're my hero for the day...

Thanks again!

Former Member
0 Kudos

Create a formula

EG., Formula_fieldname

inside the formula, code it like

if length() >= 4 then

else null

remove yourfieldname from the report and drag and drop Formula_fieldname in the report

Former Member
0 Kudos

You can use similar formula to filter data in select expert

Report -> Select Expert ->.Record

length() >=4

Only fields which meet this criteria will be passed to report

Ian

Former Member
0 Kudos

Great Ian, that's done the trick!

Thanks as well Ganesh!

Answers (0)