but I need to write the Report-Event-Code (RAP, not a delphi procedure) in delphi. I have to change some existing reports and I must add a TppVariable with a OnCalc event in the report. So I have to write the code (later visible in the report-viewer) in delphi.
I need something like that:
ppOnCalcEvent.Source.Add('if x=0 then x:=1 end;'); ppVariable.OnCalc := ppEvent;
Comments
This is the code I use to create a TppVariable and assign the OnCalc event
at runtime.
Greetings,
Filip
with TppVariable(ppComponentCreate(MyReport,TppVariable)) do
begin
Band := MyReport.DetailBand;
DataType := dtInteger;
Visible := False;
CalcType := veTraversal;
ResetType := veReportEnd;
OnCalc := ppIntVarCOUNTCalc;
end;
but I need to write the Report-Event-Code (RAP, not a delphi procedure) in
delphi. I have to change some existing reports and I must add a TppVariable
with a OnCalc event in the report. So I have to write the code (later
visible in the report-viewer) in delphi.
I need something like that:
ppOnCalcEvent.Source.Add('if x=0 then x:=1 end;');
ppVariable.OnCalc := ppEvent;
Best regards,
Kai
The RAP demos installed with the product include an example of creating RAP
event-handlers in code. Open Demos\RAP\Main and check out demo 41.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com