Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

TextFileName woes

edited March 2005 in General
if

Report1.AllowPrintToFile := true
Report1.TextFileName:='c:\sample.txt';
Report1.Print

the prindialog pops up and confirm to print to a file with
the default filename 'c:\sample.txt' already set.
if I changed the filename to, for example, 'c:\changed.txt'
and pressed OK. And inspect the Report1.TextFileName
property. It still say 'c:\sample.txt'.

I'm expecting it to be 'c:\changed.txt' now. How do I
get the real printed textfilename?

thanks !

Comments

  • edited March 2005
    Which version of ReportBuilder are you using? Are you able to recreate this
    issue in demos 101 - 106 located in the \RBuilder\Demos\1. Reports\...
    directory? Are you able to recreate this behavior by creating a simple
    application consisting of a form, report, and button to print?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2005
    I'm using RB7. And yes, I can recreate the problem with the demos.
    Open dm0011 unit and set the ff properties:

    ppCustomerList.AllowPrintToArchive:=false
    ppCustomerList.AllowPrintToFile:=true
    ppCustomerList.TextFileName:='c:\sample.txt'

    on dmMain do this

    procedure TfrmDMMain.spbPreviewPrintClick(Sender: TObject);
    begin
    ppViewer1.Print;
    showmessage(ppViewer1.Report.textfilename);
    end;

    Run the demo and open report # 0011. On the preview form
    click the print button, on the PrintDialog check "Print to File"
    checkbox and change the default textfilename to 'c:\changed.txt'.
    Press ok and see what's the Report.textfilename. It is still
    'c:\sample.txt'.

    thanks for looking at this.


  • edited March 2005
    Hi,

    In my testing with ReportBuilder 9.01, this seemed to work as expected.
    Please download a trial copy of RB 9.01 and test with that.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.