lrollins
asked on
converted binary fields in Crystal reports
I am running sql server 2016 on a new server. I have views that convert binary blob fields to text that I can use in Crystal Reports. For some reason, when I bring them into my crystal report, it only show the very first character of the converted field. If I look at it in SQL Server, it show the entire text in the converted field. Anyone have any ideas why it's doing this and how to fix it???
ASKER
It is set to grow but no luck.
How do I look at the ASCII?
How do I look at the ASCII?
Probably through SQL Manager.
You might also be able to copy it from SQL Server and paste into Word or WordPad
You might also be able to copy it from SQL Server and paste into Word or WordPad
ASKER
Someone gave me the following and said it should work but I get an invalid expression code.
CASE (UNICODE(CAST(CAST(NOTE AS VARBINARY(4000)) AS NVARCHAR(4000))) - ASCII(LEFT(CAST(NOTE AS VARBINARY(4000)), 1)))
WHEN 0 THEN CAST(CAST(NOTE AS VARBINARY(8000)) AS NVARCHAR(4000))
ELSE CAST(CAST(NOTE AS VARBINARY(8000)) AS VARCHAR(8000)) END AS NOTES
NOTE is the bit field
CASE (UNICODE(CAST(CAST(NOTE AS VARBINARY(4000)) AS NVARCHAR(4000))) - ASCII(LEFT(CAST(NOTE AS VARBINARY(4000)), 1)))
WHEN 0 THEN CAST(CAST(NOTE AS VARBINARY(8000)) AS NVARCHAR(4000))
ELSE CAST(CAST(NOTE AS VARBINARY(8000)) AS VARCHAR(8000)) END AS NOTES
NOTE is the bit field
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I had just figured that out.
ONe other idea would be to format the report object so the field can grow. It may have a Line Feed or Carriage Return
Right click the object in the report
Click FORMAT OBJECT
CLick the COMMON TAB
Click the box by CAN GROW
mlmcc