Home RAP

Create a new OnPrint Event

edited January 2012 in RAP
I need to create a new ppLabel1.OnPrint Event accesing rap code in delphi.
The OnPrint event not exists

I'm doing this but it doesn't work ;

lCodeModule := raGetCodeModule( ppReport );
lProgram := TraProgram.Create ;

lprogram.SourceLines.Add('procedure LTotArtPosOnPrint; ' + #13) ;
lprogram.SourceLines.Add('begin'+ #13) ;
lprogram.SourceLines.Add('LTotArtPos.Visible := FALSE'+ #13) ;
lprogram.SourceLines.Add('end;') ;

lProgram.Compile(True, True);

lCodeModule.AddProgram( lProgram );

ppResport.Template.SaveToDataBase ;

First LTotArtPosOnPrint is not linking to LTotArtPos Label and in the Events
Handler it isnt appears the complete procedures's name
What I doing wrong ?



This discussion has been closed.