problems printing to pdf file
Hi,
I did give it a try, but it just doesn't work.
I will descripe the situation for you:
I have a mainform where all reports are presented in a viewer. This works.
Now there are 2 buttons on the form. One to print, with the code:
ppViewer.Print;
This works just fine.
Now I have a second procedure (buttonclick):
procedure TfrmMain.sbtnPrintTofileClick(Sender: TObject);
begin
DmMain.ppReport.ShowPrintDialog := True;
DmMain.ppReport.AllowPrintToFile := True;
DmMain.ppReport.DeviceType := 'PDFFile';
DmMain.ppReport.TextFileName := '';
DmMain.ppReport.DeviceType := 'PDFFile';
DmMain.ppReport.Print;
end;
This seems to be like you told me. The report I am referring to is connected
with
the viewer component. But when I run this, I will get a popup screen that is
called: Print Preview. This is a standard screen and actually displaying
what I see in my mainform on the viewer component.
I have also tryed to delete the upper 4 lines in this procedure, but no
difference is found.
I'm out of options here. Do you have some idea's?
Thanks in advance and best regards,
Mischa E.J. Hoogendoorn
I did give it a try, but it just doesn't work.
I will descripe the situation for you:
I have a mainform where all reports are presented in a viewer. This works.
Now there are 2 buttons on the form. One to print, with the code:
ppViewer.Print;
This works just fine.
Now I have a second procedure (buttonclick):
procedure TfrmMain.sbtnPrintTofileClick(Sender: TObject);
begin
DmMain.ppReport.ShowPrintDialog := True;
DmMain.ppReport.AllowPrintToFile := True;
DmMain.ppReport.DeviceType := 'PDFFile';
DmMain.ppReport.TextFileName := '';
DmMain.ppReport.DeviceType := 'PDFFile';
DmMain.ppReport.Print;
end;
This seems to be like you told me. The report I am referring to is connected
with
the viewer component. But when I run this, I will get a popup screen that is
called: Print Preview. This is a standard screen and actually displaying
what I see in my mainform on the viewer component.
I have also tryed to delete the upper 4 lines in this procedure, but no
difference is found.
I'm out of options here. Do you have some idea's?
Thanks in advance and best regards,
Mischa E.J. Hoogendoorn
This discussion has been closed.
Comments
Perhaps the report that is connceted is not the one you are thinking that
you are using? Is a template being loaded? Can you recreate this in a simple
example and send it to us at support@digital-metaphors.com I'll be happy to
take a look at in the debugger.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com