Can't see space char in text file..

tiagofrancis
Member Posts: 48
I´m exporting some data to a text file, when the variable is empty or not max string length, i have to fill the variable with the space char..
The problem is that i've already did this with padstr but nothing apperared..
The problem is that i've already did this with padstr but nothing apperared..
0
Comments
-
Can you post the code you used?
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
In what way are you exporting the data?
I would use FORMAT instead of PADSTR...DatVar := FORMAT(DatVar,MAXSTRLEN(DatVar),'<Text><Filler Character,0>');
0 -
IF g_recCustomer.GET(Table91110.Empresa) THEN
IF (g_recCustomer."Empresa Financiadora" = TRUE) THEN
IF (g_recCustomer."Grupo TAP" = TRUE)
THEN BEGIN
g_EmployeeNo := Table91110."Num. Empregado";
g_KeyString := "Num. Empregado"+"Grau de Parentesco"+"Num seq parentesco";
g_CodUCS := Table91110."Cód. Cliente";
FillChar;
g_fileFicheiro1.WRITE(g_EmployeeNo+g_KeyString+g_CodUCS);
END;
FillChar() ---> Function
BlankSpace := ' ';
IF g_EmployeeNo = '' THEN
g_EmployeeNo := PADSTR(g_EmployeeNo,MAXSTRLEN(g_EmployeeNo),BlankSpace);
IF g_KeyString = '' THEN
g_KeyString := PADSTR(g_KeyString,MAXSTRLEN(g_KeyString),BlankSpace);
IF g_CodUCS = '' THEN
g_CodUCS := PADSTR(g_CodUCS,MAXSTRLEN(g_CodUCS),BlankSpace);0 -
Im exporting it with a report.0
-
What are you trying to achieve by putting in the buffer of blank spaces?0
-
NewString := PADSTR(String, Length [, FillCharacter])
i'm trying to put the spcace char in all "positions" of the empty variable
so i wont lose the position of the pointer in the text file.
e.g.
11111 22222 333333
11111 _____ 333333
the underscore should be the space char that happends if the variable is empty. ](*,)0 -
Hi
you should have
BlankSpace := ' ';
instead of
BlankSpace := ' ';
Albert
Edit sorry the space character doesn't show in between the ''0 -
Any one resolved this.please let me know.Thanks & Regards
Brijesh Karnatak0 -
tiagofrancis wrote:Im exporting it with a report.
If you would have used a dataport as supposed to by design you wouldn't have this issue.0 -
In FillChar function please remove the IF statments or change them to IF STRLEN(...) <> MAXSTRLEN(...) THEN0
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