Conditional field still displays on report
AlexWiley
Member Posts: 230
I have two fields on a report that I only want to display if there is information. One is a column in the body, and one is a field in the header. I coded them both the same way, but only the column disappears- the field in the header displays regardless. I don't understand what I'm missing...
In the Sales Invoice Header- OnAfterGetRecord I have:
POHeading := '';
and
IF ("Sales Invoice Header"."Your Reference" <> '') THEN
POHeading := AWWText2;
Even when the Your Reference field is blank, the AWWText2 still appears. If anyone has any input I would greatly appreciate it!
In the Sales Invoice Header- OnAfterGetRecord I have:
POHeading := '';
and
IF ("Sales Invoice Header"."Your Reference" <> '') THEN
POHeading := AWWText2;
Even when the Your Reference field is blank, the AWWText2 still appears. If anyone has any input I would greatly appreciate it!
0
Answers
-
Whenever I run into a problem caused by something being blank / not blank I add a message box to display the text AND the length of the test. You never know if someone entered a space or something.
You can also export your object to text and make sure you're not setting the POHeading value anywhere else accidentally. Could have left some debug code in there.0 -
That was it, another developer had referenced that same field. Doh! Thanks for the tip!0
-
Actually this is very good troubleshooting tip - you should publish it in Tips & Tricks...matttrax wrote:Whenever I run into a problem caused by something being blank / not blank I add a message box to display the text AND the length of the test. You never know if someone entered a space or something.Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030
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
- 323 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

