问题解决了,在fast report 资源中 找到 frxPrintter.pas 文件有这样一个过程
procedure TfrxPrinters.FillPrinters;
var
i, j: Integer;
Buf, prnInfo: PChar;
Flags, bufSize, prnCount: DWORD;
Level: Byte;
sl: TStringList;
procedure AddPrinter(ADevice, APort: String);
begin
FPrinterList.Add(TfrxPrinter.Create(ADevice, APort));
FPrinters.Add(ADevice);
end;
begin
Clear;
if Win32Platform = VER_PLATFORM_WIN32_NT then
begin
Flags := PRINTER_ENUM_CONNECTIONS or PRINTER_ENUM_LOCAL;
//Level := 5;
Level := 4;
end
else
begin
Flags := PRINTER_ENUM_LOCAL;
Level := 5;
end;
bufSize := 0;
EnumPrinters(Flags, nil, Level, nil, 0, bufSize, prnCount);
if bufSize = 0 then
Exit;
GetMem(Buf, bufSize);
try
if not EnumPrinters(Flags, nil, Level, PByte(Buf), bufSize, bufSize, prnCount) then
Exit;
prnInfo := Buf;
for i := 0 to prnCount - 1do
if Level = 4 then
with PPrinterInfo4(prnInfo)^do
begin
AddPrinter(pPrinterName, '');
Inc(prnInfo, SizeOf(TPrinterInfo4));
end
else
with PPrinterInfo5(prnInfo)^do
begin
sl := TStringList.Create;
frxSetCommaText(pPortName, sl, ',');
for j := 0 to sl.Count - 1do
AddPrinter(pPrinterName, sl[j]);
sl.Free;
Inc(prnInfo, SizeOf(TPrinterInfo5));
end;
finally
FreeMem(Buf, bufSize);
end;
end;
这个段就是查找打印机的,其中的Level是判断是以那种方式 返回打印机的信息,如果Level=5,在win2000下就返回不了网络打印机的信息,如果为4则可以返回,在delphi的printer模块中也是在winnt的操作系统以level=4来做为返回信息的.
不知道在这个版本的fastreport中谁把他改了level=5 所以就找不网络打印机
将其修改为4就解决了这个问题