Home Devices

Print dialog - "Browse" Button Does not work

edited January 2003 in Devices
I am using the following procedure to print reports in a PDF format using
ExtraDevices. However, the "Browse" button next to the edit box of the
TextFile does not work.

Is there a property setting that I missed or is this a bug? I am using
ReportBuilder Standard Edition Version 6.03.

Here's the code:

procedure TfrmReport.SaveReportAsPDF(Report: TppReport; FileName: string);
begin
DisableControls;
try
with Report do begin
DeviceType := 'PDFFile';
AllowPrintToFile := True;
ShowPrintDialog := True;
TextFileName := PDFReportPath + FileName;
Print;
end; { with }
finally
EnableControls;
end; { try/finally }
end; { SaveReportAsPDF }

Comments

  • edited January 2003
    Do other devices work (other than the PDF device)? I haven't heard of this
    behavior before. Can you create a simple project that reproduces the
    problem? Try to reproduce it using RB 7.01 to see if the problem goes away.

    I tested ExtraDevices PDF in RB 7.01, and it allows browsing of the file
    with no problems.

    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited January 2003
    Hi Jim.

    Thanks for the quick reply.

    I did some experimentation. The cause of the problem is that when the
    TextFileName is set, the button is disabled; otherwise, it works.

    I may try to work around this with my client. If I cannot, I will write
    again.

    Thanks again for the assistance and support.

    Wayne McKittrick


  • edited January 2003
    Do our reguler demos print dialogs run correctly with the PDF device? In my
    tests today, I have set the text file name and use the PDF device, and the
    browse button is enabled. I'm not able to reproduce the problem and it is
    not a known issue. However, you can replace any form in RB. You can register
    a custom print dialog. You can copy the current print dialog in ppPDlg.pas
    and create a new one that doesn't disable the button in your version of RB,
    perhaps you have modified the source before? There is a print dialog
    replacement demo in the main report demo project. The report is #121.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited January 2003
    Thanks, Jim. I will take a look at that.

    Take care.

    Wayne McKittrick

This discussion has been closed.