printing pages to cache in Memory
Jim Bennett provided me with the code below to print a report to memory.
How do I access the value of each Report objects text once this is done
???
For instance, I have ppVariable1 which evaluates to "14,963.00". How do
I find that in the ppReport1 object ???
Do I go to the TppPage object and Access the DrawCommands property ???
If so, How do I figure out which one is Variable1 ??? Could somebody
provide me some code examples ???
Thank you.
Neil Huhta
You can create a device and print the pages to a cache in memory, without
sending them to the preview:
procedure PrintToCache;
var
lDevice: TppDevice;
begin
lDevice := TppDevice.Create(Self);
lDevice.PageSetting := psLastPage;
lDevice.Publisher := ppReport1.Publisher;
ppReport1.CachePages := True;
ppReport1.PrintToDevices;
lDevice.Free;
end;
How do I access the value of each Report objects text once this is done
???
For instance, I have ppVariable1 which evaluates to "14,963.00". How do
I find that in the ppReport1 object ???
Do I go to the TppPage object and Access the DrawCommands property ???
If so, How do I figure out which one is Variable1 ??? Could somebody
provide me some code examples ???
Thank you.
Neil Huhta
You can create a device and print the pages to a cache in memory, without
sending them to the preview:
procedure PrintToCache;
var
lDevice: TppDevice;
begin
lDevice := TppDevice.Create(Self);
lDevice.PageSetting := psLastPage;
lDevice.Publisher := ppReport1.Publisher;
ppReport1.CachePages := True;
ppReport1.PrintToDevices;
lDevice.Free;
end;
This discussion has been closed.
Comments
I figured out that after ppreport1.printtodevices I can access the text
component of each report item. That works great.
Neil Huhta