Dear friends, I have a problem with Navision financials 2.6 SQL, I execute a listing of products and of each product I consent to the table 32 of mov. of products to take out certain information (with a repeat_____until, reset in each product of the chart 32), the first time it leaves me well, but I throw it without leaving the program again and they don't leave the same data, I have been able to see that making the repeat ____ until becomes crazy and he/she begins to repeat a product. It is as if the repeat to execution half lost the filter.
Somebody can help me.
<img border="0" title="" alt="" src="images/smiles/icon_sad.gif" />
0
Comments
RecProd.RESET
IF RecProd.FIND(‘-‘ <img border="0" title="" alt="" src="images/smiles/icon_wink.gif" /> THEN REPEAT
MP.RESET;
MP.SETCURRENTKEY("Tipo movimiento","Subtipo movimiento","Nº producto","Fecha registro");
MP.SETRANGE("Nº producto",RecProd."Nº producto");
MP.SETRANGE("Tipo movimiento",MP."Tipo movimiento"::Compra);
MP.SETRANGE("Cód. procedencia mov.",Proveedor);
MP.SETFILTER("Fecha registro",'>=%1&<=%2',Rec."Fecha ini analisis",Rec."Fecha fin analisis");
IF MP.FIND ('-') THEN REPEAT
T1 := T1 + MP.Cantidad*MP."Precio neto comercial";
T2 := T2 + MP.Cantidad*MP."Precio neto final";
T3 := T3 + MP.Cantidad*MP.PVP;
UNTIL MP.NEXT=0;
UNTIL RecProd.NEXT=0;
THANKS.