How i can close a pdf file exported by fastreport

58 views
Skip to first unread message

Somzeira

unread,
May 10, 2013, 10:55:20 AM5/10/13
to fastreport_f...@googlegroups.com
Hi, i want to close a pdf file exported by fastreport because i need to delete it in sequence.

My code.

DirWin  := GetWinDir()
DirWin  := DirWin + "\TEMP"
If ! LIsDir(DirWin)
   LMkDir(DirWin)
Endif
DirWin  := DirWin+"\"+Alltrim(oArqCto:CHAVESEFAZ)+".PDF"

...


FrPrn:SetProperty("PDFExport", "FileName", DirWin)
FrPrn:SetProperty("PDFExport", "OpenAfterExport", .f.)
FrPrn:SetProperty("PDFExport", "ShowDialog",.f.)
FrPrn:PrepareReport()
FrPrn:DoExport("PDFExport")
FrPrn:DestroyFR()

...

Ferase(DirWin)  //////////// here do not work cause a file just in use.

thanks in advance.
Wanderson.
Reply all
Reply to author
Forward
0 new messages