iScala Converter related queries, topics and discussions
User avatar
By admin
#307 For some reason there is an extra characters at the end of every line text field checked it is the same in 2.2. I guess some users copied it from somewhere and pasted it to iScala , just the old crystal engine did not recognize it as a problem (OR00 Invoice)
Fix is easy from now on as I found what tables are affected. But the users should enter this text manually from now on or at least they have to be sure that after copy they remove these not visible characters otherwise they will get these messages continuously, or we need to automatize the below cleaning process.

The below function has to be created only once

Code: Select allCREATE FUNCTION [Trim] (
       @Str nvarchar(max)
)
RETURNS nvarchar(max) AS
BEGIN
       DECLARE @Result nvarchar(max)

       SET @Result = LTRIM(RTRIM(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
              LTRIM(RTRIM(@Str)), CHAR(9), ''), CHAR(10), ''), CHAR(11), ''), CHAR(12), ''), CHAR(13), '')))

       RETURN @Result
END


Then the below attributes has to be adjusted with this function.

Code: Select allupdate OR172700 set OR17005 = dbo.Trim(OR17005), OR17006 = dbo.Trim(OR17006)
update OR242700 set OR24005 = dbo.Trim(OR24005), OR24006 = dbo.Trim(OR24006)


And it works.