OBJECT Report 50200 Upload Item Pictures BLOB { OBJECT-PROPERTIES { Date=12/29/16; Time=12:38:19 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; } DATAITEMS { { PROPERTIES { 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.; } SECTIONS { } } } REQUESTFORM { PROPERTIES { Width=11220; Height=2420; OnOpenForm=BEGIN ImgType:='BMP'; END; } CONTROLS { { 1000000000;TextBox;3850 ;440 ;7370 ;440 ;InPage=-1; SourceExpr=Path } { 1000000001;Label ;220 ;440 ;3300 ;440 ;CaptionML=ENU=Folder Path } { 1000000002;TextBox;3850 ;990 ;7370 ;440 ;InPage=-1; SourceExpr=ImgType } { 1000000003;Label ;220 ;990 ;3300 ;440 ;CaptionML=ENU=Image Type } } } REQUESTPAGE { PROPERTIES { } CONTROLS { } } CODE { VAR Path@1000000000 : Text[1024]; RelatedPath@1000000001 : Text[1024]; ImgType@1000000002 : Text[30]; UpdateCount@1000000003 : Integer; BEGIN { Vidura/www.navuser.com } END. } RDLDATA { } }