[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


crystal report 4.6 - apostrophe in formula

Posted on 2004-08-12
Medium Priority
Last Modified: 2012-06-22
how do I handle apostrophes in formula to be passed to a report without causing an error. I tried replace ' with '' but still wont work.
Question by:tsluu
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 101

Expert Comment

ID: 11790517
What are you trying to do?

Crystal formulas can use " " or ' ' for string data.  I would think you could use " " for the strings and a ' would then simply be a character.


Author Comment

ID: 11790634
crpt.Formulas(0) = "ReportTitle='MacDonald's Burger'"
the above will give an error.

So I tried
crpt.Formulas(0) = "ReportTitle='MacDonald''s Burger'"
and still give an error.

How do I solve the apostrophe problem?

LVL 101

Expert Comment

ID: 11791862
crpt.Formulas(0) = "ReportTitle='MacDonald""s Burger'"

That is a double double quote in Mconald's


Author Comment

ID: 11798089
crpt.Formulas(0) = "ReportTitle='MacDonald""s Burger'" works fine but my report title will display:

MacDonald"s Burger

instead of :

MacDonald's Burger
LVL 101

Accepted Solution

mlmcc earned 200 total points
ID: 11798250

crpt.Formulas(0) = "ReportTitle='MacDonald' + chr(27) + "'s Burger'"

chr(27) is the '



Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

649 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