Hi everyone,
I am trying to modify the rounding precision for certain items...so I built a report based on Item table with the following code:
OnPreDataItem() trigger
recItem.SETFILTER("No.",'%1 | %2,','1000','1001');
OnAfterGetRecord() trigger
CurrReport.BREAK;
OnPreReport() trigger
IF recItem.FINDSET THEN
BEGIN
REPEAT
recItem."Rounding Precision":=0.01;
recItem.MODIFY;
UNTIL recItem.NEXT=0;
END;
The result I get is that all the items have been modified, not just those I set with SETFILTER...
I feel that the code is mis-placed...
Can you help???
Answers
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
What is the m ain purpose of report?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I have only one dataItem based on the Item table...
The purpose of the report is to change the rounding precision for certain items...
then remove it and set
SETFILTER("No.",'%1 | %2,','1000','1001');
filter in OnpreDataitem
and
"Rounding Precision":=0.01;
MODIFY;
in OnAftergetrecord trigger..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
OK...
"Rounding Precision":=0.01;
MODIFY;
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
SETFILTER("No.",'%1 | %2,','1000','1001');
should be
SETFILTER("No.",'%1 | %2','1000','1001');
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
:oops:
Thank you for your patience !!!
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav