Urgent - Can't put a space char in a text File!

tiagofrancistiagofrancis Member Posts: 48
Hi folks,

I'm trying to put a space char in a text file but the char does not show up!
I've tried with format and padstr, but come up with nothing...

Answers

  • BeliasBelias Member Posts: 2,998
    with this small info, i can only tell you:
    yourstring := yourstring + ' ';
    

    so, can you tell us more info?and can you post your code? :mrgreen:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • tiagofrancistiagofrancis Member Posts: 48
    It's not that easy...
    i never know if i have to put a blank char see this..


    IF g_recCustomer.GET("Clientes Marcações".Empresa) THEN
    IF ("Clientes Marcações".Empresa = 'CNE1001') OR ("Clientes Marcações".Empresa = 'CNE1050') THEN
    WichEmployee := "Clientes Marcações"."Num. Empregado"
    ELSE
    WichEmployee := "Clientes Marcações"."Num. Empregado SAP";
    IF WichEmployee <> '' THEN BEGIN
    IF (g_recCustomer."Empresa Financiadora" = TRUE) THEN
    IF (g_recCustomer."Grupo TAP" = TRUE)
    THEN BEGIN
    g_EmployeeNo := WichEmployee;
    g_KeyString := WichEmployee+GetFamRelation("Clientes Marcações".Tipo)+GetParentSeq("Num seq parentesco");
    g_CodUCS := "Clientes Marcações"."Cód. Cliente";
    FillChar;
    g_fileFicheiro1.WRITE(g_EmployeeNo+g_KeyString+g_CodUCS);
    END;
    END;

    Clientes Marcações - OnPostDataItem()

    diaProgress.CLOSE;

    InicializarFicheiro()

    g_fileFicheiro1.TEXTMODE(TRUE);
    g_fileFicheiro1.WRITEMODE(TRUE);
    g_fileFicheiro1.CREATE(g_textFileName1);

    FillChar()

    BlankSpace := '0';

    IF g_EmployeeNo = '' THEN
    g_EmployeeNo := PADSTR(g_EmployeeNo,MAXSTRLEN(g_EmployeeNo),BlankSpace);
    IF STRLEN(g_EmployeeNo) < MAXSTRLEN(g_EmployeeNo) THEN
    i := MAXSTRLEN(g_EmployeeNo) - STRLEN(g_EmployeeNo);
    IF i <> 0 THEN BEGIN
    REPEAT
    g_EmployeeNo := INSSTR(g_EmployeeNo,BlankSpace,1);
    i -= 1;
    UNTIL i = 0;
    END;

    IF g_KeyString = '' THEN
    g_KeyString := PADSTR(g_KeyString,MAXSTRLEN(g_KeyString),BlankSpace);
    IF STRLEN(g_KeyString) < MAXSTRLEN(g_KeyString) THEN
    i := MAXSTRLEN(g_KeyString) - STRLEN(g_KeyString);
    IF i <> 0 THEN BEGIN
    REPEAT
    g_KeyString := INSSTR(g_KeyString,BlankSpace,1);
    i -= 1;
    UNTIL i = 0;
    END;

    IF g_CodUCS = '' THEN
    g_CodUCS := PADSTR(g_CodUCS,MAXSTRLEN(g_CodUCS),BlankSpace);
    IF STRLEN(g_CodUCS) < MAXSTRLEN(g_CodUCS) THEN
    i := MAXSTRLEN(g_CodUCS) - STRLEN(g_CodUCS);
    IF i <> 0 THEN BEGIN
    REPEAT
    g_CodUCS := INSSTR(g_CodUCS,BlankSpace,1);
    i -= 1;
    UNTIL i = 0;
    END;
  • BeliasBelias Member Posts: 2,998
    :shock:
    first of all...try to substitute this
    BlankSpace := '0';
    

    with this
    BlankSpace := ' ';
    

    (there is a space between the quotes)
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • tiagofrancistiagofrancis Member Posts: 48
    lol, that is what i'm puting instead of space, because space does not apear..
  • BeliasBelias Member Posts: 2,998
    lol, that is what i'm puting instead of space, because space does not apear..

    I don't understand you, sorry...ok, now I have understood the phrase...let me think
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • TitofTitof Member Posts: 4
    Is Your Variable is of Type Code ?

    If Yes you cannot add spaces at the extremity of a code Variable !
    You should change your Variable Type into Text.
  • BeliasBelias Member Posts: 2,998
    Titof wrote:
    Is Your Variable is of Type Code ?

    If Yes you cannot add spaces at the extremity of a code Variable !
    You should change your Variable Type into Text.

    =D> =D>
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • tiagofrancistiagofrancis Member Posts: 48
    Thank you very much! that was the problem!
Sign In or Register to comment.