Bug assigning Str variable
Hi,
In a form I have a text variable named 'X' and his initial value is 'Hi'
Memo1 is: [X]
In Delphi code I have:
FRReport.Variables := ''''+'Hello'+'''';
And then I get in the report:
Hello
(Whitout quotes).
Now, if I wrote:
FRReport.Variables := ''''+'Hello'+#13#10+'World'+'''';
then I get:
'Hello
World'
(With a quote at the begining and at the end).
I guess the correct result should be:
Hello
World
(Whitout quotes).
Regards.
In a form I have a text variable named 'X' and his initial value is 'Hi'
Memo1 is: [X]
In Delphi code I have:
FRReport.Variables := ''''+'Hello'+'''';
And then I get in the report:
Hello
(Whitout quotes).
Now, if I wrote:
FRReport.Variables := ''''+'Hello'+#13#10+'World'+'''';
then I get:
'Hello
World'
(With a quote at the begining and at the end).
I guess the correct result should be:
Hello
World
(Whitout quotes).
Regards.
Comments
READ THE PROGRAMMERS MANUAL ON MODIFYING A VARIABLES VALUE
All single quotes must be doubled;
- string should not contain #13#10 symbols.
Not happy about it should not contain #13#10... but you're right.
Thanks.
Now, if my string has #13#10 then I ommit the quotes
FRReport.Variables := 'Hello'+#13#10+'World';
All works perfect this way.
Regards.