Who can provide a tutorial for integer DataItem?
clement_blue
Member Posts: 16
After I study all the topics about the 'Integer' DataItem in this forum, I still cannot fully understand how to use it...
Who can provide me a tutorial for the following scenario:
1) I already create a DataItem (Customer)
2) How to use Integer DataItem to display a message ("Show message") 3 times after each record is received.
I did try to use one Iteger DataItem to do the above scenario, but it only show the message one time...
In Integer DataItem,
1) I write SETRANGE(Number,1,3); in OnPreDataItem().
2) and I write MESSAGE(Customer."No."); in OnAfterGetRecord.
Can anyone correct my code?
Thank you.
Who can provide me a tutorial for the following scenario:
1) I already create a DataItem (Customer)
2) How to use Integer DataItem to display a message ("Show message") 3 times after each record is received.
I did try to use one Iteger DataItem to do the above scenario, but it only show the message one time...
In Integer DataItem,
1) I write SETRANGE(Number,1,3); in OnPreDataItem().
2) and I write MESSAGE(Customer."No."); in OnAfterGetRecord.
Can anyone correct my code?
Thank you.
0
Comments
-
I don't know, if you use a report or a dataport.
1. define a variable i as integer - in OnPreDataItem define i := 0;
2. In the OnAfterGetRecord-Trigger:
i += 1;
if i = 3 then begin
message ...
i := 0;
end;
Another way is:
i+= 1;
If i mod 3 = 0 then
message0 -
Sorry...I know the way u mention. But....
I wonder know how to use Integer(Virtual Table) DataItem to show the message.
Because I wanna learn to use the Integer DataItem.0 -
Hi!!!!!!!!!!
Indent Integer dataitem below customer..........
OnPredataitem (of Integer)
IF Number <= 3 THEN
Number := 1;
SETRANGE(Number,1,3);
OnAfterGet Record(of Integer)
If Number <= 3 THEN
message('Customer."No." = %1',Customer."No.");
regards,
Sophia0 -
There's really no need for any code at all. I'm not going into whether the usage of an integer dataitem is the proper solution here, which I am not convinced that it is. I'd propably think about a footer with a few labels with the messages before adding an integer dataitem.
Add the integer dataitem indented under your other dataitem, and define the DataItemTableView as "SORTING(Number) WHERE(Number=FILTER(1..3))". Then all you need to do is add a body section for the Integer dataitem, and you are done. The only coding you would need is to change the message.0
Categories
- All Categories
- 73 General
- 73 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 333 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
