Crystal Reports How to find/replace character in a string

Posted on 2011-10-05
Last Modified: 2012-05-12
I have a string field which I need to "clean up."  I  need to be able to find and delete a specific character in string
How do I do this?

Question by:mbroad02
    LVL 100

    Accepted Solution

    Is this just for display in the report?

    Crystal has a REPLACE function

    Replace ({YourStringToCorrect","BadCharacters","GoodCharacters")

    If you need to save the string for later use you can use it as

    Global StringVar strCorrected;
    strCorrected := Replace ({YourStringToCorrect","BadCharacters","GoodCharacters");

    If you are trying to correct it in the database then Crystal is not the tool to use.



    Author Comment

    Sorry I did not specify.  YES, it is only a display field in the report.  I will try your suggestions and let you know.


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now