Passing along new line commands to Report Header

a_ascanio
Member Posts: 2
I am modifying a report in Dynamics NAV 2016 with the SQL Report Builder. Its based in the 206 Sales invoice report. In the header it uses an array of length 8 for the address. But if for example the total use of the array is 4 and I want to add a field right after the customer address (its VAT) there will be 4 empty spaces, like this:
Array[1] Info
Array[2] Info
Array[3] Info
Array[4] Info
Array[5] (empty)
Array[6] (empty)
Array[7] (empty)
Array[8] (empty)
VATNoText
I would like to show:
Array[1] Info
Array[2] Info
Array[3] Info
Array[4] Info
VATNoText
So I though I could create a text variable, iterate the array and then add whichever text after (VATNoText in this case). In between each iteration I could add a sort of new line jump command for the report builder. then I could pass this variable through the "=Code.SetData(Cstr....." to a box with can shrink and can grow set as true via Code.GetData(X,1)
I have tried adding the following between each iteration:
' /n '
' + System.Environment.Newline + '
' + vbcrlf + '
' / '
' \n '
' \ ';
It just shows as plain text, and when the string reaches the length of the text box it jumps line.
Example of (sad) output:
Beef House / Frau Karin Fleischer \n
Südermarkt 6 + vbcrlf + 40593
Düsseldorf \ USt-IdNr.: XXXXXXXXXX
The dream:
Beef House
Frau Karin Fleischer
Südermarkt 6
40593 Düsseldorf
USt-IdNr.: XXXXXXXXXX
Any help will be appreciated in my first struggle vs the report builder!
Thank you in advance
Array[1] Info
Array[2] Info
Array[3] Info
Array[4] Info
Array[5] (empty)
Array[6] (empty)
Array[7] (empty)
Array[8] (empty)
VATNoText
I would like to show:
Array[1] Info
Array[2] Info
Array[3] Info
Array[4] Info
VATNoText
So I though I could create a text variable, iterate the array and then add whichever text after (VATNoText in this case). In between each iteration I could add a sort of new line jump command for the report builder. then I could pass this variable through the "=Code.SetData(Cstr....." to a box with can shrink and can grow set as true via Code.GetData(X,1)
I have tried adding the following between each iteration:
' /n '
' + System.Environment.Newline + '
' + vbcrlf + '
' / '
' \n '
' \ ';
It just shows as plain text, and when the string reaches the length of the text box it jumps line.
Example of (sad) output:
Beef House / Frau Karin Fleischer \n
Südermarkt 6 + vbcrlf + 40593
Düsseldorf \ USt-IdNr.: XXXXXXXXXX
The dream:
Beef House
Frau Karin Fleischer
Südermarkt 6
40593 Düsseldorf
USt-IdNr.: XXXXXXXXXX
Any help will be appreciated in my first struggle vs the report builder!
Thank you in advance
0
Best Answer
-
Solved! Using: https://forum.mibuso.com/discussion/32805/hidden-characters-carriage-return-and-line-feed
CLEAR(vCustAddrCombined); // Defining Carriage return and line feed for the line jumps // Source: https://forum.mibuso.com/discussion/32805/hidden-characters-carriage-return-and-line-feed vCharCR := 13; vCharLF := 10; FOR i := 1 TO ARRAYLEN(CustAddr) DO IF CustAddr[i] <> '' THEN vCustAddrCombined += CustAddr[i] + FORMAT(vCharCR) + FORMAT(vCharLF) ELSE i := ARRAYLEN(CustAddr); vCustAddrCombined += vVATCombined;
0
Answers
-
Solved! Using: https://forum.mibuso.com/discussion/32805/hidden-characters-carriage-return-and-line-feed
CLEAR(vCustAddrCombined); // Defining Carriage return and line feed for the line jumps // Source: https://forum.mibuso.com/discussion/32805/hidden-characters-carriage-return-and-line-feed vCharCR := 13; vCharLF := 10; FOR i := 1 TO ARRAYLEN(CustAddr) DO IF CustAddr[i] <> '' THEN vCustAddrCombined += CustAddr[i] + FORMAT(vCharCR) + FORMAT(vCharLF) ELSE i := ARRAYLEN(CustAddr); vCustAddrCombined += vVATCombined;
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