My application generates reports in archive files. I now need to turn these archive files into PDF files. What is the best way to do this? Are there any examples? We have got the TExtraOptions component to enable PDF generation
Sure. Just use the Archive Reader component to load the report and print to PDF. The Archive Reader supports the same properties as the Report component as far as devices are concerned.
The problem I now have is that I am trying to do this all at runtime.
When I use the code you gave with a report that has been put onto a form, it works fine, but when I use it with a report that has been created at run time, associated with the same form, it doesnt. The catch is that it is very hard to find out the exact cause of the problem because my application is multi threaded
The form that the report is associated to contains a TExtraDevices component.
Comments
The Archive Reader supports the same properties as the Report component
as far as devices are concerned.
AR.AllowPrintToFile := True;
AR.ArchiveFileName := 'c:\test.raf';
AR.DeviceType := 'PDFFile';
AR.TextFileName := 'c:\test.pdf';
AR.ShowPrintDialog := False;
AR.Print;
James Waler
Waler Ltd
http://www.waler.com
The problem I now have is that I am trying to do this all at runtime.
When I use the code you gave with a report that has been put onto a form, it
works fine, but when I use it with a report that has been created at run
time, associated with the same form, it doesnt. The catch is that it is
very hard to find out the exact cause of the problem because my application
is multi threaded
The form that the report is associated to contains a TExtraDevices
component.
Any ideas?
Cheers
Paul