Create a new OnPrint Event
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 ?
Thanks...
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 ?
Thanks...
This discussion has been closed.
Comments
Take a look at the following article on how to create RAP programs in code.
http://www.digital-metaphors.com/rbWiki/RAP/Fundamentals/How_To...Create_RAP_Globals_in_Code
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com