Print Page | Close Window

Promptex with quotes inside string

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3096
Printed Date: 05 May 2024 at 12:17am


Topic: Promptex with quotes inside string
Posted By: stangers
Subject: Promptex with quotes inside string
Date Posted: 02 May 2008 at 2:24pm
I am somewhat of a Crystal Reports newbie and I'm using version XI. I have a report that I pass the parameter values using the promptex URL commands. They all work just fine unless the string I'm search for has quotation marks (") inside of it. This wouldn't be a problem except for the fact that many of our users have them in that field.
 
For example, in our Remarks field the report runs fine if I send the following to the Remarks parameter in the report via the URL (promptex-Remarks=*shipping 1ea F condition*):
 
promptex-Remarks=*shipping+1ea+F+condition*
 
However, there are also similar records but they have double quotes around the F so that it looks like this (promptex-Remarks=*shipping 1ea "F" condition):
 
promptex-Remarks=*shipping+1ea+%22F%22+condition*
 
When I try to pass this value to the parameter I get an error stating "The syntax of the value for prompt 'Remarks' is incorrect. Please correct the syntax and try again. Thread was being aborted."
 
If I run the report from Crystal Reports it works even with the quotes inside the string but when I pass it through the URL it errors out. Any ideas on how to pass a string value with double quotes inside the string to the report using promptex? It seems like it's just a syntax problem but I've tried every different way I can think of.
 
Thanks,
Scott



Print Page | Close Window