Unable to render report if I create pipelines in pass thru' function
Hi,
I attempt to create pipelines in pass thru' function and hope the report
can render data from pipelines.
Here are the steps I did:
ppReport1.Template.LoadFromFile('myreport1.rtm');
C := raGetCodeModule(aProducer as TppReport);
if Assigned(C) then begin
ProgCreate := C.GlobalCreateProgram;
ProgVar := C.GlobalVarProgram;
if Assigned(ProgCreate) and Assigned(ProgVar) then begin
ProgVar.Compile(False, False);
ProgCreate.Compile(False, False);
ProgCreate.Execute; // <<-- data pipelines will be created here
end;
end;
//// ppReport1.Template.LoadFromFile('myreport1.rtm');
ppReport1.InitializeParameters;
ppReport1.PrintToDevices;
The report didn't render data from pipelines created in ProgCreate.
However, if I remove the comment in line (////) and run the code, the
data from pipelines created in pass thru' function will show on my report.
Am I doing the right things here? Please advice. Thank you very much.
--
Best Regards,
Chau Chee Yang
I attempt to create pipelines in pass thru' function and hope the report
can render data from pipelines.
Here are the steps I did:
ppReport1.Template.LoadFromFile('myreport1.rtm');
C := raGetCodeModule(aProducer as TppReport);
if Assigned(C) then begin
ProgCreate := C.GlobalCreateProgram;
ProgVar := C.GlobalVarProgram;
if Assigned(ProgCreate) and Assigned(ProgVar) then begin
ProgVar.Compile(False, False);
ProgCreate.Compile(False, False);
ProgCreate.Execute; // <<-- data pipelines will be created here
end;
end;
//// ppReport1.Template.LoadFromFile('myreport1.rtm');
ppReport1.InitializeParameters;
ppReport1.PrintToDevices;
The report didn't render data from pipelines created in ProgCreate.
However, if I remove the comment in line (////) and run the code, the
data from pipelines created in pass thru' function will show on my report.
Am I doing the right things here? Please advice. Thank you very much.
--
Best Regards,
Chau Chee Yang
This discussion has been closed.
Comments
A passthru function is meant to be called from RAP. If you don't need to
make this call from RAP, you could simply create a separate Delphi routine
and call that directly.
I'm a bit unclear about what you are trying to accomplish. Are you certain
the code contained in the passthru function successfully creates and
connects the pipelines? My first suggestion would be to get this entire
project working in Delphi (without the use of RAP), then begin moving the
code to RAP and passthru functions.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com