OnGetText
Hi,
this is a very strange one.
I have several subreports all set to pbSection stored in a database. Each
subreport has a ppSystemVariable in the footerband set to vtPageSet. The
systemvariable counts up from 1 to my be 100 and more. No problem. But up
from a certain subreport I want to restart the pagecountings till to the end
of the report.
This is not possible with the property ResetPageNo set to True. The certain
subeport starts counting with 1 but the next subreport starts either with 1
or with a pagenumber regarding to the main report and not to the mentioned
subreport.
So I code an eventhandler
procedure TForm1.ppSpecialSystemGetText(Sender: TObject;
var Text: String);
begin
Text := 'What ever I want';
end;
But to my very surprise there is no action. I only can watch the
pagenumbers.
But if I code
procedure TForm1.ppSpecialSystemGetText(Sender: TObject;
var Text: String);
begin
(Sender as TppSystemVariable).Visible := False; works and
(Sender as TppSystemVaraible).VarType := "all values" works too.
but
(Sender as TppSystemVariable).Text := 'I will see this text' does not
work.
end;
Is this a bug or normal behavior?
By the way a ppLabel instead of a systemvariable works.
Thanks in advance
Martin Cremer
this is a very strange one.
I have several subreports all set to pbSection stored in a database. Each
subreport has a ppSystemVariable in the footerband set to vtPageSet. The
systemvariable counts up from 1 to my be 100 and more. No problem. But up
from a certain subreport I want to restart the pagecountings till to the end
of the report.
This is not possible with the property ResetPageNo set to True. The certain
subeport starts counting with 1 but the next subreport starts either with 1
or with a pagenumber regarding to the main report and not to the mentioned
subreport.
So I code an eventhandler
procedure TForm1.ppSpecialSystemGetText(Sender: TObject;
var Text: String);
begin
Text := 'What ever I want';
end;
But to my very surprise there is no action. I only can watch the
pagenumbers.
But if I code
procedure TForm1.ppSpecialSystemGetText(Sender: TObject;
var Text: String);
begin
(Sender as TppSystemVariable).Visible := False; works and
(Sender as TppSystemVaraible).VarType := "all values" works too.
but
(Sender as TppSystemVariable).Text := 'I will see this text' does not
work.
end;
Is this a bug or normal behavior?
By the way a ppLabel instead of a systemvariable works.
Thanks in advance
Martin Cremer
This discussion has been closed.
Comments
Which version of ReportBuilder are you using. In my testing with RB 7.04
and Delphi 7, I changed the Text value inside the GetText event of a
SystemVariable in my footer band and the changed text was reflected when I
printed the report. If possible, please send a small example demonstrating
the behavior you describe in .zip format to support@digital-metaphors.com
and I'll take a look at it for you.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I'm using ReportBuilder 7.04 and Delphi 6.02. I send you a small example.
But the error occurs only in subreports not in main reports.
Cheers
Martin Cremer
very strange. The example program I intend sending to you works now. I
don't know what's going on but actually it has nothing to with RB.
Thanks anyway.
Cheers
Martin Cremer