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
Answers
Ishwar Sharma
My Blogs: Dynamics Community Blog | Blogspot
Connect: Google + | Twitter
Ishwar Sharma
My Blogs: Dynamics Community Blog | Blogspot
Connect: Google + | Twitter
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?
======================
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;
What are the filters on the DataItem?
How many records in the table that is set as the DataItem?
with maximum record of 383278
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.
Ishwar Sharma
My Blogs: Dynamics Community Blog | Blogspot
Connect: Google + | Twitter
Try changing the code to something like...
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.
Great, in that case please mark this as "Answered"
You can find this under the replies where you should see something like "Did this answer the question YES or NO"