String :=FORMAT(integer)
shiven
Member Posts: 9
Hi,
Sorry but I'm newbie in C/SIDE and I have small problem.
Normaly ..that's very easy (I think :oops: ):
integer :=1;
string := format(integer);
Why : string = "0" ????
Thanks in advance
Sorry but I'm newbie in C/SIDE and I have small problem.
Normaly ..that's very easy (I think :oops: ):
integer :=1;
string := format(integer);
Why : string = "0" ????
Thanks in advance
0
Answers
-
it's not possible; the message of this code returns 1
integer := 1; string := format(integer); message(string);
check your code better...where did you put it?
BTW: it's not a good habit to name the variables like this: althought "integer" is not a reserved word, like "THEN", "IF", "BEGIN" etc. it is also the name of a nav table. this can lead to bugs if you're programming (for example) a report based on the integer table. Actually, this is probably the source of your problem :-k0 -
Thanks.
The name of the variables is just for the exemple.
ok I start again with the real name of the variables...
It's a report, and gDecQtyOnSticker is a TextBox (Integer)
gDecQtyOnStickerTxt:=FORMAT(gDecQtyOnSticker)
gCUPQH_BARECODE.C128MakeBarcode(gDecQtyOnStickerTxt, rTempPic3, 5300, 423, 96, TRUE);
In my function C128MakeBarcode I need to have a string... and I have a string but gDecQtyOnStickerTxt is always ="0"...0 -
use debugger, and check the value of gDecQtyOnSticker
OR
put this line BETWEEN your 2
message(gDecQtyOnStickertxt);
if it returns 0, it means that is your decimal variable to not be evaluated.
if it returns something <>0, you've probably done something in C128MakeBarcode function that transform your gDecQtyOnStickertxt to 0.0 -
Sorry ](*,)
This line initializes the gDecQtyOnStickerTxt in the request form and the gDecQtyOnSticker = 0.
I put this line in "OnPreSection" and now it's ok.
Thank you a lot for you're help.
Best regard0 -
please, don't put business logic under the sections unless you can't do it in another way. this makes the code hard to find; moreover the code is not executed if you're running on 3tiers (RTC with rdlc report layout).
section triggers are intended to manage visibility of the section only (through Currreport.showoutput instruction).
if possible move the code in the onaftergetrecord.0 -
Belias wrote:please, don't put business logic under the sections unless you can't do it in another way. this makes the code hard to find; moreover the code is not executed if you're running on 3tiers (RTC with rdlc report layout).
section triggers are intended to manage visibility of the section only (through Currreport.showoutput instruction).
if possible move the code in the onaftergetrecord.
=D>
I've moved.
Thanks a lot !0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions