RB problems with Inherited?!
Hi,
I have a FORM FATHER "inherited" of reports, where in this FORM is a
TppDBPipeline and a TppReport. TppDBPipeline is linked to DataSource and
DataSource it is linked to TClientDataSet.
In TppReport exists: TppHeaderBand, TppDetailBand, TppFooterBand. In
TppHeaderBand the following components exist: 1 TppImage, 5 TppLabel, 2
TppSystemVariable and 1 TppLine.
In TppFooterBand 2 TppLabel exist.
In this same FORM these methods exist:
procedure TFrmRelPAI.ppImgLogoClientePrint(Sender: TObject);
begin
ppImgLogoCliente.Picture.LoadFromFile(FMP00001.DiretorioLogos+'\BrasaoClient
e.bmp');
end;
procedure TFrmRelPAI.ppSystmVrblPaginaRelatorioGetText(Sender: TObject;
var Text: String);
begin
Text := StrZero(StrToInt(ppSystmVrblPaginaRelatorio.Text),06);
end;
procedure TFrmRelPAI.ppLblNOME_RELATORIOGetText(Sender: TObject;
var Text: String);
begin
Text := Self.Name;
end;
procedure TFrmRelPAI.ppLblNomeUsuarioGetText(Sender: TObject;
var Text: String);
begin
Text := FMP00001.NomeUsuario;
end;
Ok. My UNIT completes it possesses 262 Lines of Programming, but, anything
else regarding RB!
My problem is:
When I create a descending FORM, and I execute this method:
procedure TFMP99990.ActnImprimirExecute(Sender: TObject);
begin
inherited;
if (ClntDtStRelPAI.Active) and (not ClntDtStRelPAI.Eof) then
begin
ClntDtStRelPAI.First;
ppRprtSelect.DeviceType := ' Screen';
ppRprtSelect.Template.FileName := FMP00001.DiretorioRTM+ ' \ '
+Self.Name+'.rtm';
ppRprtSelect.Template.LoadFromFile;
ppRprtSelect.Print;
end;
end;
RB is in LOOP and soon after it comes back me the message of: Stack
Overflow!
The same form without Inheritance, works perfectly!
Use D6/RB 6.0/DBExpress.
I thank the answers.
--
Sucess,
Anderson Haertel Rodrigues - AHR
Florian?polis - Santa Catarina - Brazil
I have a FORM FATHER "inherited" of reports, where in this FORM is a
TppDBPipeline and a TppReport. TppDBPipeline is linked to DataSource and
DataSource it is linked to TClientDataSet.
In TppReport exists: TppHeaderBand, TppDetailBand, TppFooterBand. In
TppHeaderBand the following components exist: 1 TppImage, 5 TppLabel, 2
TppSystemVariable and 1 TppLine.
In TppFooterBand 2 TppLabel exist.
In this same FORM these methods exist:
procedure TFrmRelPAI.ppImgLogoClientePrint(Sender: TObject);
begin
ppImgLogoCliente.Picture.LoadFromFile(FMP00001.DiretorioLogos+'\BrasaoClient
e.bmp');
end;
procedure TFrmRelPAI.ppSystmVrblPaginaRelatorioGetText(Sender: TObject;
var Text: String);
begin
Text := StrZero(StrToInt(ppSystmVrblPaginaRelatorio.Text),06);
end;
procedure TFrmRelPAI.ppLblNOME_RELATORIOGetText(Sender: TObject;
var Text: String);
begin
Text := Self.Name;
end;
procedure TFrmRelPAI.ppLblNomeUsuarioGetText(Sender: TObject;
var Text: String);
begin
Text := FMP00001.NomeUsuario;
end;
Ok. My UNIT completes it possesses 262 Lines of Programming, but, anything
else regarding RB!
My problem is:
When I create a descending FORM, and I execute this method:
procedure TFMP99990.ActnImprimirExecute(Sender: TObject);
begin
inherited;
if (ClntDtStRelPAI.Active) and (not ClntDtStRelPAI.Eof) then
begin
ClntDtStRelPAI.First;
ppRprtSelect.DeviceType := ' Screen';
ppRprtSelect.Template.FileName := FMP00001.DiretorioRTM+ ' \ '
+Self.Name+'.rtm';
ppRprtSelect.Template.LoadFromFile;
ppRprtSelect.Print;
end;
end;
RB is in LOOP and soon after it comes back me the message of: Stack
Overflow!
The same form without Inheritance, works perfectly!
Use D6/RB 6.0/DBExpress.
I thank the answers.
--
Sucess,
Anderson Haertel Rodrigues - AHR
Florian?polis - Santa Catarina - Brazil
This discussion has been closed.
Comments
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
it work?
The idea is simple, to maintain a standard header for my systems!
Thank you.
header. Then use a subreport in all of your reports' headerbands. Now, you
can dynamically load the standard header report for your reports. There is
a demo of this approach in the installed
..\RBuilder\Demos\EndUser\DynamicSubreportLoading\
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com