Hello experts,
I have put such a code on OnInitReport() trigger:
StoringLoc.CALCFIELDS(StoringLoc."Item No");
IF StoringLoc.FINDFIRST THEN
REPEAT
StoringLoc."Item No (Normal Field)" := lStoringLoc."Item No"; //StoringLoc."Item No (Normal Field)" - Is a Normal Field
StoringLoc.MODIFY; //lStoringLoc."Item No" - is a FlowField
UNTIL StoringLoc.NEXT = 0;
And unfortunatlly I get the error:
You Cannot make any changes in the database until a transaction has been started
The goal of that code is to renew the field "Item No (Normal Field)", before the report is run.
I need to have an ItemNo as NORMAL FIELD, not a Flow Field, because later i need to sort that raport by an ItemNo.
Any idea, please?
p.s.
Nav 4.03. Ms Sql 2005
http://www.reinwestuj.pl Inwestuj w nieruchomości. Condohotele, aparthotele.
Comments
p.s.
I had the problem with Calcfields. I found that it works only when the Calcfields is inside the loop: