Field on report

ach
Member Posts: 16
How can I surpress a field on a report if blank, a good example of this would be a customer address Add1,Add2,Add3 where Add2 is blank so I want the address to move up by one.
Thanks
Thanks
0
Comments
-
Hi,
create a text variable and set the Dimensions property
eg.:
Name Type Length Dimensions
txtAddress Text 250 8
Next you can fill up the array with values.
eg.:
txtAddress[1] := 'CompanyName';
txtAddress[3] := 'StreetName and Streetnumber';
txtAddress[4] := 'CityName';
txtAddress[5] := 'CountyName';
txtAddress[6] := 'CountryName';
Then you launch the function COMPRESSARRAY(StringArray)
And the empty dimensions will be removed from the array.
eg.:
COMPRESSARRAY(txtAddress)
Result:
txtAddress[1] will contain 'CompanyName';
txtAddress[2] will contain 'StreetName and Streetnumber';
txtAddress[3] will contain 'CityName';
txtAddress[4] will contain 'CountyName';
txtAddress[5] will contain 'CountryName';
Regards,Now, let's see what we can see.
...
Everybody on-line.
...
Looking good!0 -
Regards,
_________________
Now, let's see what we can see.
...
Everybody on-line.
...
Looking good!Best regards
Tommy0 -
is possible to use a index array at spot of the numbers, for print a array used one only section?0
-
You can use the Format Address codeunit, like standard Navision. This will take care of all your needs. Take a look at the standard invoice report in the Sales Invoice Header OnPreDataitem trigger and the controls in the PageLoop Header (1) section to see how it works.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