sPath := GetEnvironmentVariable('USERPROFILE'); //Ex :C:\Users\Administrator
sFileName := sPath + '\Report.rpt';
QuickRep1.Prepare;
QuickRep1.QRPrinter.Save(sFileName); //將結果輸出到檔案
QuickRep1.QRPrinter.Load(sFileName); //載入檔案
QuickRep1.PrinterSettings.PrinterIndex := iCustPrinter; //指定印表機
QuickRep1.QRPrinter.PrinterIndex := iCustPrinter; //指定印表機
QuickRep1.QRPrinter.PreviewModal; //預覽文件
QuickRep1.QRPrinter.Cleanup; //關閉文件
...
QuickRep1.QRPrinter.Save(sFileName); //將結果輸出到檔案
QuickRep1.QRPrinter.Load(sFileName); //載入檔案
QuickRep1.PrinterSettings.PrinterIndex := iCustPrinter; //指定印表機
QuickRep1.QRPrinter.PrinterIndex := iCustPrinter; //指定印表機
QuickRep1.QRPrinter.PreviewModal; //預覽文件
QuickRep1.QRPrinter.Cleanup; //關閉文件
...
沒有留言:
張貼留言