关于 报表
我的代码,运行到frxReport1.PrepareReport() 就出错
Query_RP.Close; Query_RP.SQL.Clear; Query_RP.SQL.Add(Str_SQL); Query_RP.Parameters.ParamByName('SNO').Value := Query_Search.FieldByName('SNO').AsString; Query_RP.Open; Str_Path:= ExtractFilePath( Application.ExeName ); Str_RPFile := Str_Path + 'rp\rp3.fr3'; frxReport1.LoadFromFile(Str_RPFile,True); frxReport1.PrepareReport(); frxReport1.PrintOptions.ShowDialog:=false; frxReport1.print;function TfrxDBDataset.GetValue(Index: String): Variant;var i: Integer;begin i := Fields.IndexOf(Index); if i <> -1 then Result := TField(Fields.Objects[i]).Value else begin Result := Null; if (ReportRef <> nil) and (frxResources <> nil) then //添加这一行上去 ReportRef.Errors.Add(ReportRef.CurObject + ': ' + frxResources.Get('dbFldNotFound') + ' ' + UserName + '."' + Index + '"'); end;end;