OBJECT Report 50200 Upload Item Pictures BLOB { OBJECT-PROPERTIES { Date=12/29/16; Time=12:45:27 PM; Modified=Yes; Version List=Vidura/www.navuser.com; } PROPERTIES { ProcessingOnly=Yes; OnPreReport=BEGIN ImgType:=DELCHR(ImgType,'<>','.'); Path:=DELCHR(Path,'<>',' '); IF Path='' THEN ERROR('Folder path must have value'); IF ImgType='' THEN ERROR('Image type must have value'); END; } DATASET { { 1 ; ;DataItem; ; DataItemTable=Table27; OnAfterGetRecord=BEGIN RelatedPath:=Path+'\'+"No."+'.'+ImgType; IF EXISTS(RelatedPath) THEN BEGIN Picture.IMPORT(RelatedPath,FALSE); MODIFY; UpdateCount+=1; END; END; OnPostDataItem=BEGIN IF UpdateCount<>0 THEN MESSAGE('%1 Item pictures uploaded successfully',UpdateCount); END; ReqFilterFields=No. } } REQUESTPAGE { PROPERTIES { OnOpenPage=BEGIN ImgType:='BMP' END; } CONTROLS { { 1 ; ;Container ; Name=con; ContainerType=ContentArea } { 2 ;1 ;Field ; Name=Folder Path; SourceExpr=Path } { 3 ;1 ;Field ; Name=Image Type; SourceExpr=ImgType } } } LABELS { } CODE { VAR Path@1003 : Text[1024]; RelatedPath@1002 : Text[1024]; ImgType@1001 : Text[30]; UpdateCount@1000 : Integer; BEGIN { Vidura/www.navuser.com } END. } RDLDATA { } }