Report is in running infinity time
Dear I have small updation, for posted dimension entries for table 355 table.
I want update real values from 5802.
When I run report, it is running longer time and no results.
even I have added somewhere in the standards reports also
Can suggest what is issues

issue
Warm regards
KMK
I want update real values from 5802.
When I run report, it is running longer time and no results.
even I have added somewhere in the standards reports also
Can suggest what is issues

issue
Warm regards
KMK
0
Answers
-
This might be happening due to huge data. Try to update for 100 entries at a time and see if it works. If it does, try 1K entries at a time.1
-
also tried with one day transactions.0
-
There is huge data in table 355 as well. What is your code? Could you paste it here??1
-
Have you added any new dataitems to the report and if so what have you set in the DataItemTableView?
In particular have you added an "Integer" dataitem and if so what filters have you set and what code have you got in the OnPreDataItem & OnAfterGetRecord triggers for the DataItem?0 -
This is code on OnAfterGetRecord
======================
Dimtab.RESET;
Dimtab.SETCURRENTKEY(Dimtab."Table ID",Dimtab."Entry No.");
Dimtab.SETRANGE(Dimtab."Table ID",5802);
Dimtab.SETRANGE(Dimtab."Entry No.","Value Entry"."Entry No.");
Dimtab.SETFILTER(Dimtab."Dimension Code",'PROFIT CENTER') ;
IF NOT Dimtab.FIND('-') THEN
BEGIN
Dimtab.INIT;
Dimtab."Table ID":=5802;
Dimtab."Entry No.":="Value Entry"."Entry No.";
Dimtab."Dimension Code":='PROFIT CENTER' ;
Dimtab."Dimension Value Code":="Value Entry"."Global Dimension 1 Code";
Dimtab.INSERT;
END
ELSE
BEGIN
Dimtab."Dimension Value Code":="Value Entry"."Global Dimension 1 Code";
Dimtab.MODIFY;
END;0 -
Which dataitem does that OnAfterGetRecord relate to?
What are the filters on the DataItem?
How many records in the table that is set as the DataItem?0 -
posting date filter on table 5802
with maximum record of 383278
0 -
Please optimize your code as shown below, It might help..
Dimtab.RESET;
Dimtab.SETCURRENTKEY(Dimtab."Table ID",Dimtab."Entry No.",Dimtab."Dimension Code"); // Add "Dimension Code" in the key
Dimtab.SETRANGE(Dimtab."Table ID",5802);
Dimtab.SETRANGE(Dimtab."Entry No.","Value Entry"."Entry No.");
Dimtab.SETFILTER(Dimtab."Dimension Code",'PROFIT CENTER') ;
IF Dimtab.ISEMPTY THEN //Instead of NOT FIND('-'), use ISEMPTY
BEGIN
Dimtab.INIT;
Dimtab."Table ID":=5802;
Dimtab."Entry No.":="Value Entry"."Entry No.";
Dimtab."Dimension Code":='PROFIT CENTER' ;
Dimtab."Dimension Value Code":="Value Entry"."Global Dimension 1 Code";
Dimtab.INSERT;
END
ELSE
//BEGIN //Remove this line
IF Dimtab.FINDFIRST THEN BEGIN // Add this line.
Dimtab."Dimension Value Code":="Value Entry"."Global Dimension 1 Code";
Dimtab.MODIFY;
END; // Add this line
//END; //Remove this line
Do not use FIND('-') as it is slower, use FINDFIRST instead. To know more, check http://forum.mibuso.com/discussion/41687/difference-between-find-and-findfirst
And like I said earlier, try with lesser records. Instead of posting date, apply Entry No. filter on Value Entry DataItem. For eg. 100..200, and then check.1 -
My guess is that it is runnng ok but just taking a while, you can try optimising a bit and committing changes and this should help and will also mean you can stop and then start again and it will not try fixing the ones it's already done.
Try changing the code to something like...IF NOT Dimtab.GET(5802,"value entry"."entry no.",'PROFIT CENTER') THEN BEGIN Dimtab.INIT; Dimtab."Table ID":=5802; Dimtab."Entry No.":="Value Entry"."Entry No."; Dimtab."Dimension Code":='PROFIT CENTER' ; Dimtab."Dimension Value Code":="Value Entry"."Global Dimension 1 Code"; Dimtab.INSERT; END ELSE IF Dimtab."Dimension Value Code" <> "Value Entry"."Global Dimension 1 Code" THEN BEGIN Dimtab."Dimension Value Code":="Value Entry"."Global Dimension 1 Code"; Dimtab.MODIFY; CommitCounter := CommitCounter +1: IF (CommitCounter MOD 1000) = 0 THEN COMMIT; END;
Also, it would be faster if you created a separate "processing only" report for this instead of just adding this code to the Inventory Valuation report.1 -
It is great help. It is done. very nice of you
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
