Problem when updating a Form !

rmouza
Member Posts: 52
Hello EveryBody,
I've developped a form in wich i displayed information from Sales Line table (Ver 4.02) automatically with a Process only report.
The problem is that the "CurrenForm.Update" doesn't function at the first time when activating the "OnActivation" Trigger. But it does at the second time!!!
Can someone help me please ! [-o<
I've developped a form in wich i displayed information from Sales Line table (Ver 4.02) automatically with a Process only report.
The problem is that the "CurrenForm.Update" doesn't function at the first time when activating the "OnActivation" Trigger. But it does at the second time!!!
Can someone help me please ! [-o<
0
Comments
-
I am not completely clear on what you mean :?
Do you populate the data via a report? What is the structure of your code?0 -
Yes i do this with a Report (Processing only). i need some information from Table "Sales Line" then i display data in a formular (of course the report and the formular are based on a table).
The "Editable" property of all my formular's columns are set to "NO"!
The problem is that : On the FIRST (Only the first) "OnActivate" of the formular, the "CurrForm.UPDATE" doesn't work (: the data are not displayed on the formular!!)!! But when i click on any other window in Navision, then i click on my formular, the lines (that the report extracted from the sales line table) appears.
At the other extraction of line from Sales Line, there's no problems !!! (the lines appears directly)!
Best regards.0 -
Still, I am confused...
Can you describe more, what is your goal and what you are doing? Something like:
1) From one button I run report
2) This report fill temp table with some entries
3) The report run form which shows these temp records...
(this is just example)0 -
thanks Kine!
So:
1--> i run a Form (wich will contain the information)
2--> from one Botton i run a report (process only)
3--> the report fill my From with informations from Sales line
4--> The problem now is that the information aren't displayed
NB: i know that when i activate an other window then i re activate my Form, the informations are displayed !0 -
If you run the report through C/AL code on your button (in OnPush) than you need to add the CurrForm.Update into this trigger. If you are running the report through button properties, it will be better in this case to use C/AL code to run it.0
-
i tryed to put the "CurrForm.Update " in the "OnPush" trigger after running the report but it doesn't work!0
-
-
This the Code i wrote :
<Control1000000050> - OnPush()
REPORT.RUN(50024);
CurrForm.UPDATE;
I also puted "CurrForm.UPDATE;" in the "OnActivate" trigger of the Form0 -
Try RUNMODAL to force Navision to wait for the report to finish before the update.
REPORT.RUNMODAL(50024);
Regards
Claus0 -
Thanks Claus and all others,
With "Report.RunModal" it works now!
But there still a problem of updating the display of a sum in a textbox.
I do the same thing to activate the new display of the new value!
Should i put the crrForm.UPDATE somewhere too?0 -
1) Where and how are you calculating the SUM?
2) Where the edit box is placed?
please, more info...0 -
1--> The SUM is calculated in the last line of a column.
2--> Every time i add informations to my Form the sum is updated!
3--> The text Box where i display the sum is in a Frame! aatached to the same Form.
4--> The problem is that when i add iformation (the Sum is caulated automatically in the column) the TextBox containing the sum is not updated ==> doesn't contain the right (last) sum!0 -
Still, the process of calculating the sum is not clear for me. In which trigger you are calculating it? Can you post some C/AL code example?0
-
Form - OnActivateForm()
CurrForm.UPDATE;
//---> Extract the Last Sum and affect it !
IF Rec.FINDLAST = TRUE THEN
BEGIN
gDec_CumulDsResume := Rec."Cumul Besoins";
END;
This is the OnActivate trigger of my Form. And i display the sum in a text box in a frame.
--> When i add lines in the FORM the SUM change there! But doesn't change in the text box !0 -
Better is to calc the value in OnAfterGetCurrRecord. Try to not use the OnActivate trigger, it is not good place for updating something.0
-
(I'm calc the SUM with a speciifc function. I put it in the trigger "OnActivate" of an other column needed for the SUM ) IN the Table in wich is based my FORM .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