GroupheaderBand2 Before Print
Hello,
I have a report with 2 groups and try to write a procedure
GroupHeaderBand2BeforePrint - event.
All runtime.
I open the report, create the before-print, compile save, all OK.
Then, when I print the report I get error : "Ubable to load BeforePrint
code for GroupHeaderBand2, no object with this name found".
This all is runtime, and the template is saved in the database.
Is this a bug ? Is there a work around ?
(The message also apears if there is no code (only comment) so it has
nothing to do with the code I try to write in the handler.)
regards,
Dirk Janssens.
I have a report with 2 groups and try to write a procedure
GroupHeaderBand2BeforePrint - event.
All runtime.
I open the report, create the before-print, compile save, all OK.
Then, when I print the report I get error : "Ubable to load BeforePrint
code for GroupHeaderBand2, no object with this name found".
This all is runtime, and the template is saved in the database.
Is this a bug ? Is there a work around ?
(The message also apears if there is no code (only comment) so it has
nothing to do with the code I try to write in the handler.)
regards,
Dirk Janssens.
This discussion has been closed.
Comments
Occasionally this behavior can occur when there is a naming conflict
between multiple TppReport objects. To avoid the issue, be sure there
in only one TppReport on each form/datamodule in your application.
If this does not solve the issue, you can try clearing the template and
freeing all the report modules before loading a new one.
ppReport.Template.New;
ppReport.FreeModules;
//load new template...
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I just downloaded the latest version : 16.02 for Delphi 2007. Same issue.
I also tried :
- adding the event, compile the report, save to disk.
- REstart program, read the report from disk --> the event is not fired .
Oen report in designer, compile, print-->same error ..
- removed one group : same error (only "Ubable to load BeforePrint code for
GroupHeaderBand1, no object with this name found".
regards,
Dirk Janssens.
The report is cerates just before loading the template :
Report := TppReport.Create(self);
Report.Template.DatabaseSettings.DataPipeline := plItems ;
Report.Template.DatabaseSettings.TemplateField := 'TEMPLATE';
Report.Template.DatabaseSettings.NameField := 'REPORTNAME';
Report.Template.SaveTo := stDatabase ;
Report.Template.Format := ftASCII ;
Report.Template.DatabaseSettings.Name := ReportName ;
Report.Template.LoadFromDatabase ;
HowEver, the designer is tied to a TppReport that is on the form.
I put your code after I close the report-explorer, and now the error is
gone, but the event is not fired (!?)
any ideas ?
regards,
Dirk.
I do some more testing and let you know, OK ?
thanks so far !!
regards,
Dirk.
"Dirk Janssens" schreef in bericht news:5575bf13$1@mail....
Hi Nico,
The report is cerates just before loading the template :
Report := TppReport.Create(self);
Report.Template.DatabaseSettings.DataPipeline := plItems ;
Report.Template.DatabaseSettings.TemplateField := 'TEMPLATE';
Report.Template.DatabaseSettings.NameField := 'REPORTNAME';
Report.Template.SaveTo := stDatabase ;
Report.Template.Format := ftASCII ;
Report.Template.DatabaseSettings.Name := ReportName ;
Report.Template.LoadFromDatabase ;
HowEver, the designer is tied to a TppReport that is on the form.
I put your code after I close the report-explorer, and now the error is
gone, but the event is not fired (!?)
any ideas ?
regards,
Dirk.
Consider it "solved" !
thanks a lot !
regards,
Dirk Janssens.
"Dirk Janssens" schreef in bericht news:5575c9ed@mail....
I think your answer solved it...
I do some more testing and let you know, OK ?
thanks so far !!
regards,
Dirk.
"Dirk Janssens" schreef in bericht news:5575bf13$1@mail....
Hi Nico,
The report is cerates just before loading the template :
Report := TppReport.Create(self);
Report.Template.DatabaseSettings.DataPipeline := plItems ;
Report.Template.DatabaseSettings.TemplateField := 'TEMPLATE';
Report.Template.DatabaseSettings.NameField := 'REPORTNAME';
Report.Template.SaveTo := stDatabase ;
Report.Template.Format := ftASCII ;
Report.Template.DatabaseSettings.Name := ReportName ;
Report.Template.LoadFromDatabase ;
HowEver, the designer is tied to a TppReport that is on the form.
I put your code after I close the report-explorer, and now the error is
gone, but the event is not fired (!?)
any ideas ?
regards,
Dirk.