Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Let's challenge : string with both single and double quote in it

Status
Not open for further replies.

Periko

Programmer
Feb 24, 2003
134
0
0
BE
Hello,

Something strange. I use on my CR a barcode font (format interleaved 2outof5).

To be able to use this font, I have to convert through a formula my string. This I do in VB6. Then I pass the content througt a formula-string-field to my CR.

Strange enough, the translation of my number (01100604900640) gives me the converted string : !$-)'})K"

This contect I have to pass in my formulafield like :

Report.FormulaFields.GetItemByName("BarCBlankR").Text = Chr(39) & hString & Chr(39)

where hstring has the converted content.

Whether I use chr(39) or chr(34) to start and terminate my string, cr gives me an error because cr cannot determine what's the qualifier for the string.

Anybody a suggestion ?

Kind regards,
Pedro...
 
The big issue I see here is that your converted string has a chr(39) (single quote) and a chr(34) (double quote). For the most part it seems that CR likes to see a chr(34). But once you assign that converted string to a text variable, you now have mismatched quotes. I do not know of a solution.
 
Hello Kray,

Thx for the response. I solved meanwhile the problem.

Since the start of the textfield is always ! and the end is always " i did the following :

Report.FormulaFields.GetItemByName("BarCBlankR").Text = Chr(34) & hString & Chr(34) & Chr(34)

where hstring has following content : !$-)'})K"

so I repeate my last double quote that's the end of my qualification once more (so twice) and then it works.

thx anyway !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top