在delphi中,用ppReport1控件做的打印,怎样用一个程序将打印的内容发送到多台制定的打印机上,如将第一个打印内容发送到第一个打印机上,第二个打印内容发送到第二个打印机上;
  ...前面是数据集的设置
  ppReport1.ShowPrintDialog:=false;
  ppReport1.DeviceType:=dtPrinter;
  ppReport1.Printer.PrinterName := '打印机1';
  ppReport1.Printer.
  ppReport1.Print;ppReport1.Printer.PrinterName := '打印机1';这里设置无效
各位帮忙看一下...

解决方案 »

  1.   

      ppReport1.ShowPrintDialog:=false; 
      ppReport1.DeviceType:=dtPrinter; 
      //ppReport1.Printer.PrinterName := '打印机1'; 去掉
      设置printer.PrinterIndex
       for i:=0 to printer.Printers.Count-1 do
         printer.PrinterIndex:=i;  ppReport1.Printer. 
      ppReport1.Print;   
      

  2.   

    yuqianyi1974 老于:
    printer.PrinterIndex   
    printer点不出这个属性啊?
      

  3.   

    uses
      printers;
    printer.PrinterIndex  用于修改默认打印机
      

  4.   

    yuqianyi1974 老于:
    printer.PrinterIndex := 0;
    还是没设置过来嘛
    再指教一下?