problem in sql

oscareaoscarea Member Posts: 6
edited 2002-01-22 in Navision Financials
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" />

Comments

  • oscareaoscarea Member Posts: 6
    THIS IS THE CODE:

    RecProd.RESET
    IF RecProd.FIND(‘-&#8216 <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.
  • oscareaoscarea Member Posts: 6
    thanks, but the problem continues existing, I have removed the range that not this in the key and the first one makes it to me well and it can be that the second also, but the third report already makes it to me bad, I have looked at the information that he/she goes taking out and a moment that loses the filter of the product arrives and you doesn't come out but rather it continues, it finishes that product and then he/she makes the other ones but with the filter of the previous one.
Sign In or Register to comment.