change text type to integer

bangswitbangswit Member Posts: 265
hi...
how to change text file to integer type?
i have imported txt file
but while i want to import to integer field, it can't

Comments

  • SunsetSunset Member Posts: 201
    Evaluate(IntVariable, TextVariable)
    Don't just take my word for it, test it yourself
  • bangswitbangswit Member Posts: 265
    so if we want to fill to database field (integer), we should create 2 variable ?? (1 integer, 1 text)

    my code doesn't work
    Linenumber := COPYSTR(vstring3,4,6);
    DF."3-Detail Tag" := 'DET';
    DF."3-Line Item Number" := EVALUATE(LineNUmber,vstring3);
  • SunsetSunset Member Posts: 201
    OBJECT Report 50000 Text2Integer
    {
      OBJECT-PROPERTIES
      {
        Date=12-08-10;
        Time=11:31:37;
        Modified=Yes;
        Version List=;
      }
      PROPERTIES
      {
        ProcessingOnly=Yes;
        OnPostReport=BEGIN
                       RandomText := 'RAN123456';
                       EVALUATE(LineInteger, COPYSTR(RandomText, 4, 6));
                       MESSAGE('%1', LineInteger);
                     END;
    
      }
      DATAITEMS
      {
      }
      REQUESTFORM
      {
        PROPERTIES
        {
          Width=9020;
          Height=3410;
        }
        CONTROLS
        {
        }
      }
      REQUESTPAGE
      {
        PROPERTIES
        {
        }
        CONTROLS
        {
        }
      }
      CODE
      {
        VAR
          RandomText@1000000000 : Text[10];
          LineInteger@1000000001 : Integer;
    
        BEGIN
        END.
      }
      RDLDATA
      {
      }
    }
    
    
    Don't just take my word for it, test it yourself
  • bangswitbangswit Member Posts: 265
    ow ok
    thanks a lot
  • bangswitbangswit Member Posts: 265
    but how about the reversal?
    change integer type to text
  • SunsetSunset Member Posts: 201
    Text := FORMAT(YourVariable)
    Don't just take my word for it, test it yourself
  • bangswitbangswit Member Posts: 265
    thanks a lot Sunset
    =D> =D>
Sign In or Register to comment.