Subject |
Re: form.MYTITLETEXT |
From |
Mervyn Bick <invalid@invalid.invald> |
Date |
Sat, 22 Jun 2019 11:25:46 +0200 |
Newsgroups |
dbase.getting-started |
On 2019-06-22 7:23 AM, Ken Mayer wrote:
> On 6/21/2019 1:59 PM, Ruth Bromer wrote:
>> The following command doesn't seem to work. Has it been eliminated or
>> do I need to write it some other way?
>>
>> form.MYTITLETEXT1 = form.pagetemplate1.mytitletext1
>
> form.MYTITLETEXT1.text = form.pagetemplate1.mytitletext1
>
> You need to add a reference to the property that contains the text.
Mm, form.MYTITLETEXT1 = form.pagetemplate1.mytitletext1 is correct.
The report designer streams out the line, with the appropriate object
names, in the constructor code for any text object placed on a
pagetemplate object.
Ruth, what gave you the impression that the line isn't working?
The constructor code MYTITLETEXT1 on pagetemplate1 would be something like
this.PAGETEMPLATE1.MYTITLETEXT1 = new TEXT(this.PAGETEMPLATE1)
with (this.PAGETEMPLATE1.MYTITLETEXT1)
//various properties set here in the constructor code
text = "The title for my report."
form.MYTITLETEXT1 = form.pagetemplate1.mytitletext1
endwith
The line doesn't appear to be used within the report itself and the
report will actually render without a problem if the line is removed.
The line of code does, however, serve a purpose if one ever needs to
change the text property of a text object on a pagetemplate before
rendering the report.
Without the line one would need to use the following in a launch form if
one wanted to change the text property of the object.
set procedure to whatever.rep
form.rep = new whateverReport()
form.rep.pagetemplate1.mytitletext1.text = 'A new title for the report'
form.rep.render()
While the code above will still work if the line is left in, the line of
code allows one to simplify this a bit.
set procedure to whatever.rep
form.rep = new whateverReport()
form.rep.mytitletext1.text = 'A new title for the report'
form.rep.render()
Mervyn.
|
|