Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OBJECT Report 50666 XMLPort creator
- {
- OBJECT-PROPERTIES
- {
- Date=07/04/15;
- Time=12:57:06;
- Modified=Yes;
- Version List=EVO;
- }
- PROPERTIES
- {
- ProcessingOnly=Yes;
- OnPreReport=BEGIN
- TempBlob.INIT;
- TempBlob.Blob.CREATEOUTSTREAM(OutStr);
- CR := 13;
- LF := 10;
- END;
- OnPostReport=BEGIN
- FileManagement.BLOBExport(TempBlob,'XMLP50000.txt',TRUE);
- END;
- }
- DATASET
- {
- { 1000000000;;DataItem; ;
- DataItemTable=Table2000000001;
- DataItemTableView=WHERE(Type=CONST(Table));
- OnPreDataItem=BEGIN
- WriteString('OBJECT XMLport 50000 New XMLport');
- WriteString('{');
- WriteString(' OBJECT-PROPERTIES');
- WriteString(' {');
- WriteString(STRSUBSTNO(' Date=%1;',FORMAT(TODAY,0,'<Day,2>.<Month,2>.<Year>')));
- WriteString(STRSUBSTNO(' Time=%1;',FORMAT(SYSTEM.TIME,0,'<Hours24,2>:<Minutes,2>:<Seconds,2>')));
- WriteString(' Modified=No;');
- WriteString(' Version List=;');
- WriteString(' }');
- WriteString(' PROPERTIES');
- WriteString(' {');
- WriteString(' Format=Variable Text;');
- WriteString(' FieldDelimiter=<None>;');
- WriteString(' FieldSeparator=|;');
- WriteString(' {');
- WriteString('');
- WriteString(' }');
- WriteString(' ELEMENTS');
- WriteString(' {');
- GUIDString := CREATEGUID;
- WriteString(STRSUBSTNO(' { [%1]; ;Root ;Element ;Text }',GUIDString));
- WriteString('');
- END;
- OnAfterGetRecord=BEGIN
- GUIDString := CREATEGUID;
- ObjName := Object.Name;
- ObjName := DELCHR(ObjName,'=',' ');
- ObjName := DELCHR(ObjName,'=','.');
- ObjName := DELCHR(ObjName,'=','<');
- ObjName := DELCHR(ObjName,'=','>');
- ObjName := DELCHR(ObjName,'=','&');
- ObjName := DELCHR(ObjName,'=','/');
- ObjName := DELCHR(ObjName,'=','%');
- ObjName := DELCHR(ObjName,'=','(');
- ObjName := DELCHR(ObjName,'=',')');
- IF STRLEN(ObjName) < 20 THEN ObjName := ObjName + PADSTR('',20 - STRLEN(ObjName),' ');
- WriteString(STRSUBSTNO(' { [%1];1 ;%2;Element ;Table ;',GUIDString,ObjName));
- WriteString(STRSUBSTNO(' SourceTable=Table%1;',Object.ID));
- WriteString(STRSUBSTNO(' MinOccurs=Zero }',Object.ID));
- WriteString('');
- END;
- OnPostDataItem=BEGIN
- WriteString(' }');
- WriteString(' EVENTS');
- WriteString(' {');
- WriteString(' }');
- WriteString(' REQUESTPAGE');
- WriteString(' {');
- WriteString(' PROPERTIES');
- WriteString(' {');
- WriteString(' }');
- WriteString(' CONTROLS');
- WriteString(' {');
- WriteString(' }');
- WriteString(' }');
- WriteString(' CODE');
- WriteString(' {');
- WriteString(' }');
- WriteString('}');
- END;
- ReqFilterFields=ID }
- { 1000000001;1;DataItem; ;
- DataItemTable=Table2000000041;
- DataItemTableView=SORTING(TableNo,No.)
- WHERE(Class=CONST(Normal),
- Enabled=CONST(Yes));
- OnAfterGetRecord=BEGIN
- CASE TRUE OF
- Field.Class = Field.Class::FlowField:
- CurrReport.SKIP;
- Field.Class = Field.Class::FlowFilter:
- CurrReport.SKIP;
- Field.Enabled = FALSE:
- CurrReport.SKIP;
- Field.Type = Field.Type::TableFilter:
- CurrReport.SKIP;
- Field.Type = Field.Type::RecordID:
- CurrReport.SKIP;
- Field.Type = Field.Type::Binary:
- CurrReport.SKIP;
- Field.Type = Field.Type::BLOB:
- CurrReport.SKIP;
- END;
- GUIDString := CREATEGUID;
- ObjName := Field.FieldName;
- ObjName := DELCHR(ObjName,'=',' ');
- ObjName := DELCHR(ObjName,'=','.');
- ObjName := DELCHR(ObjName,'=','<');
- ObjName := DELCHR(ObjName,'=','>');
- ObjName := DELCHR(ObjName,'=','&');
- ObjName := DELCHR(ObjName,'=','/');
- ObjName := DELCHR(ObjName,'=','%');
- ObjName := DELCHR(ObjName,'=','(');
- ObjName := DELCHR(ObjName,'=',')');
- IF STRLEN(ObjName) < 20 THEN ObjName := ObjName + PADSTR('',20 - STRLEN(ObjName),' ');
- IF COPYSTR(ObjName,1,1) IN ['1','2','3','4','5','6','7','8','9','0'] THEN ObjName := '_' + ObjName;
- WriteString(STRSUBSTNO(' { [%1];2 ;%2;Element ;Field ;',GUIDString,ObjName));
- WriteString(STRSUBSTNO(' DataType=%1;',Field.Type));
- WriteString(STRSUBSTNO(' FieldValidate=No;',Field.Type));
- WriteString(STRSUBSTNO(' SourceField=%1::%2;',Object.Name,Field.FieldName));
- WriteString(STRSUBSTNO(' MinOccurs=Zero;',Field.Type));
- WriteString(STRSUBSTNO(' MaxOccurs=Once }',Field.Type));
- WriteString('');
- END;
- DataItemLink=TableNo=FIELD(ID) }
- }
- REQUESTPAGE
- {
- PROPERTIES
- {
- }
- CONTROLS
- {
- }
- }
- LABELS
- {
- }
- CODE
- {
- VAR
- TempBlob@1000000010 : TEMPORARY Record 99008535;
- OutStr@1000000005 : OutStream;
- GUIDString@1000000003 : Text[50];
- ObjName@1000000002 : Text[30];
- CR@1000000001 : Char;
- LF@1000000000 : Char;
- FileManagement@1000000006 : Codeunit 419;
- PROCEDURE WriteString@1200050001(String@1200050000 : Text[250]);
- BEGIN
- OutStr.WRITETEXT(STRSUBSTNO('%1%2%3',String,CR,LF));
- END;
- BEGIN
- END.
- }
- RDLDATA
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement