0
votes

I am retrieving data from an SQL stored procedure and displaying it in a text field in a pdf document created with Crystal Reports.

The problem is whenever the data contains an '&' character it only displays the text before that character.

It is being stored in the SQL table as the actual character '&' and when the query is executed the SQL result set shows the correct character as well as when it is being displayed in a browser. But when the report is ran and the same data is being retrieved, Crystal Reports is not able to display the character.

Is there a way to tell Crystal Reports to display the character?

Using SQL Server 2000 with Visual Studio 2008 and Crystal Reports Basic

2

2 Answers

1
votes

I determined that the text with the ampersand was being passed to the page that was creating my Crystal Report through the URL. I used the javascript function encodeURIComponent('&') to replace the ampersand with the '%26' value and when it reached the Crystal Report it was being read as an ampersand and not as a URL variable which was messing everything up.

0
votes

the ampersand character is the crystal syntax for concatenation, you have to put the & into double quotes to show it on your report.