View Full Version : How to suppress part of a string in Crystal Reports XI

04-22-2010, 08:02 AM
I have a report using Crystal Reports XI and I need to be able to supress part of a description.

We are using a tilda (~) to separate what we want to see from what we want suppressed.

So we have a description which says "Please do not leave in the driveway ~ stock valuable"

We want the document to only show "Please do not leave in the driveway".

Can anyone help with a suppression formula?

Many thanks

04-22-2010, 08:55 PM
Hey Joanne,

The formula can be defined something like this:

Left("my~string", InStr("my~string", "~")-1)

In this case, the output would by "my"


04-22-2010, 11:02 PM
Thanks so much for your help.

Would I need to define the my you used? Can I use a wildcard as the part before the ~ will vary.

Thanks again

04-23-2010, 03:04 PM
Well, when you edit the formula (inside the formula workshop), just replace the string I used with the actual report field. You can just drag and drop it in there. I only used "my~string" as an example.


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum