|
Gives the name of the window |
|
windownum |
internal number of the opened window |
|
global
procedure ItemSearchDsm()
begin
record RcVc RepSpec;
Integer wn,nwn;
String 255 fldnam,wnname;
boolean testf;
testf = true;
wn = CurWindow;
wnname = GetWindowClass(wn);
fldnam = WindowActiveField(wn);
switch(wnname) begin
case "ProdDClass":
if(fldnam <> "Item")then begin
testf = false;
end;
case "RecDClass":
if(fldnam <> "Item")then begin
testf = false;
end;
case "VIDClass":
if(fldnam <> "Item")then begin
testf = false;
end;
otherwise
if(fldnam <> "ArtCode")then begin
testf = false;
end;
end;
if (testf) then begin
ReportDefaults(RepSpec,"SearchItemRClass");
RepSpec.repname = "SearchItemRn";
RepSpec.critname = "SearchItemRClass";
RepSpec.Media = mtScreen;
RepSpec.UsedOnly = wn;
RepSpec.f3 = wnname;
if (UserReportAccess(RepSpec)) then begin
nwn = OpenWindow("SearchItemRClass",0,0,"","",RepSpec);
DeselectWindow(nwn,false);
PutWindowRecord(nwn,RepSpec);
SelectWindow(nwn);
WindowFieldGoto(nwn,RepSpec,-1,"f1",true);
end else begin
MessageBox(0,"Not allowed to run this report");
end;
end;
return;
end;
|
««