Hi,
I have tried in many ways, but without successs... i want to change a
caption in a report. at runtime.
Using QuickReport i can use the code Reports.QRLabel1.text:='MyText'. Easy.
But how can i do this in ReportBuilder. Is there some way?
Thank you!
Tonis.
Comments
component:
MyReportLabel.Caption := 'Your caption';
bye
label
Thanks,
but i have still a trouble. I know i have to try something you suggested,
but i do not find a place where to write that. I have a report (component
for report) ppReport1. I this report i have a caption called Label1. I want,
that after i click on the button, label1 will get some sort of value. for
example i have tried to use code
ppReport1.Label1.caption:=Form1.Edit1.text;
ppReport1Label1.caption:=Form1.Edit1.text;
in the onclick event. But they are giving me errors that (Label1 and
ppReport1Label) are undeclared.
So where i have to type this code?
Thanks a lot!
Regards,
Tonis.
Easy.
declaration of the form unit). It is visible inside the Form unit and you
should have full control over it your OnClick event.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
It indicates to me that the report isn't in the same form that the button. So
include in the uses clause the unit wherethe report is. If it's a datamodule
then write something like:
MyDataModule.Label1.Caption := 'you caption';
If it's a form:
MyForm.Label1.Caption := 'you caption';
Look that you don't write MyReport.Label1.Caption but simply Label1.Caption
preceeded by the form or datamodule name.
good luck , bye