Decimal Variable

-matrix-
Member Posts: 103
Hi Everybody !
In a report i need to assign blank value (not default value zero)to decimal variable when some condition occur.
Is it Possible this?
Thanks in Advance
In a report i need to assign blank value (not default value zero)to decimal variable when some condition occur.
Is it Possible this?
Thanks in Advance
0
Comments
-
There are no NULL values in NAV, so if you want to signify that a decimal is undefined rather than 0, you'll have to do that with an extra boolean or something similar.0
-
Use Blank Zero Property.0
-
Use a text variable in the control into which you FORMAT your decimal or clear it before.0
-
Why do you need all this when you can use the existing property called BlankZero?0
-
mohana_cse06 wrote:Why do you need all this when you can use the existing property called BlankZero?0
-
As stated above, there is no NULL value for anything. You can do a work around in this case, though. You can start with a blank or empty string which will represent your NULL value. You can then assign that string a formatted value, like FORMAT(Your Number) so that you know it actually received a value. If it is blank, then it is still "NULL". If you need to convert that string back to a number you can use EVALUATE.
You can even make an IsNull function that takes in a string and returns true if it is blank (NULL) so that you can understand your code better.
A boolean that holds whether or not the number has been assigned to work as well, though.0 -
The orig poster needs to clarify what he means by "blank value".
if the goal is just not to show 0 value decimals in a report or form then "BlankZero" is an easy solution.
if the goal is a "blank value", a decimal can't have a blank value and you will have format over to a text type.0 -
Thanks To everybody! But I Solved Using a visibility condition on the report fields with value 00
-
Don't reinvent the wheel, do like mohana_cse06 suggested.0
-
Exactly. Just click the field in question. View the properties. Set BlankZero to YES.0
-
mohana_cse06 wrote:Why do you need all this when you can use the existing property called BlankZero?-matrix- wrote:... when some condition occur.
We all assumed, though, that by-matrix- wrote:i need to assign blank value0 -
vaprog wrote:-matrix- ment to show a blank space instead of some number.0
-
I still disagree.
-matrix- said that he wants to assign a certain value to a decimal, given a certain condition is met. That assigned value should be blank and should not be zero. He does not say anything about the case when this condition is not met. So we must assume the decimal can have any decimal value then, including zero. If we use BlankZero, even those will not print, even though the condition is not met.
A common application of this scenario is showing a percental change. If no change happened, the value is 0 %. If the value you define to be the base (100%) is 0, your result is undefined. So you should show some sensible indication for this condition. I believe showing a blank in this situation is a well choice, but showing blank for no change is not that good.0 -
@vaprog: You are reading too much into Matrix's first post. Their English might not be as good as yours, they probably never meant as much as you seem to read into the question. Look at the first post, then look at Matrix's reaction to later posts. Try to see what they wanted to ask, and see which reply answered the question for them.
You are insisting on the full meaning of the correctness within the words that were posted, and you do not seem to want to try to understand what the OP wanted, which clearly was not as elaborate as what you are talking about. This is not a theoretical discussion about what might or might not be meant when using certain words in a certain context. The OP asked a question, and the BlankZero property was clearly what they wanted to know about. It doesn't matter what other meaning their words might have. The original question was understood and answered by Mohana, there simply was no further meaning in the OP.
You can disagree all you want, and technically there's merit to what you are saying, but in this case you are always going to be wrong0 -
I found this forum, and sound interesting which indicate have similar prob with me.
For me, I need to not show the 0 if it doesn't have anything follow/related.
For example :
Part No Description QTY Unit UnitPrice Total
P001 Coverhead 2 PCS 0 0
PO#C00123 0 0
1 Months 0 0
The zero (0) on 2nd and 3rd line will dissapear, but on 1st line still show there. How I make it?
Anyone can help me?
Thx0
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