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

tiagofrancis
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...
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...
0
Answers
-
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;0 -
lol, that is what i'm puting instead of space, because space does not apear..0
-
tiagofrancis wrote: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 think0 -
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.0 -
Thank you very much! that was the problem!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions