Unable to load BeforePrint code for GroupFooterband1, no object with this name found
Hello,
I have a strange problem. My Invoice report works from the explorer /
designer. When loading from code it OFTEN results in an error :
Unable to load BeforePrint code for GroupFooterband1, no object with this
name found
The code where the error occurs in my program looks like :
logmsg( ' loading reportname : ' + ReportName);
ppReport2.Template.LoadFromDatabase; // Here the
error occurs
logmsg( '--loaded' );
The RAP-code for the GroupFooterBand1 in the document is :
procedure GroupFooterBand1BeforePrint;
begin
AFAFooterTop( Report, GroupFooterBand1);
end;
AFAFooterTop is a TRaSystemFunction that is registered on initialization.
What could cause this error ?
Ad Franse
I have a strange problem. My Invoice report works from the explorer /
designer. When loading from code it OFTEN results in an error :
Unable to load BeforePrint code for GroupFooterband1, no object with this
name found
The code where the error occurs in my program looks like :
logmsg( ' loading reportname : ' + ReportName);
ppReport2.Template.LoadFromDatabase; // Here the
error occurs
logmsg( '--loaded' );
The RAP-code for the GroupFooterBand1 in the document is :
procedure GroupFooterBand1BeforePrint;
begin
AFAFooterTop( Report, GroupFooterBand1);
end;
AFAFooterTop is a TRaSystemFunction that is registered on initialization.
What could cause this error ?
Ad Franse
This discussion has been closed.
Comments
Which version of ReportBuilder and Delphi are you using? Does this happen
with every report template you load or just certain templates with the
GroupFooterBand.BeforePrint event implemented. How often does it occur, are
there any other circumstances which cause the error (order of events)?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Delphi 2007, Codegear Rad Studio
Report Builder 10.08 (enterprise)
Nexus DB 2.08.03
I only have a few reports. Most of the time I use this one.
It looks that this happens the first time correct. later on, it looks as if
half of the tries is with succes.
hypothesis:
Is it possible that during a (second, third etc) load a new name is assinged
to this
groupband ? in that case this band is assigned eg GroupFooterband2 but the
rapcode still references the old name ?
Ad Franse
I upgraded to 11.04 (enterprise), and the same problem exists.
I was able (don't ask me how !) to reproduce the problem.
I got the error from the ppReportExplorer, but after the error message, the
document was shown.
But now it has the footerband with a name of groupfooterband3 (was
groupFooterband1) !
Ad Franse
Thanks for upgrading. Please give me the exact steps I can take to recreate
the issue and I'll try it on my machine.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com