Re: Strange behavior : I4GL , transactions AND reports = Lost data (SOLVED)
Posted in 2012
Hi all, Like my INFORMIX version is 11.5 and it has "SAVEPOINTS" the solution to the example is easy. #----- Beguin example TEST.4gl---- SOLVED #--------------------------------------------------------- # # Strange behavior I4GL : Transactions and reports # # (c) BASE - Gesti d'Ingressos # Isidre Pons # 11/30/2012 v 1.0 # #--------------------------------------------------------- database oartdb #------------------------------------------------------------------------------- main #------------------------------------------------------------------------------- define i smallint start report test_1 to "kk.out" for i = 1 to 10 begin work if (i mod 3) = 0 then display "Commited value :",i else SQL savepoint a; END SQL display "Rollback value :",i SQL rollback to savepoint a; END SQL end if commit work output to report test_1(i) end for finish report test_1 prompt "Press a key : " for char status end main #------------------------------------------------------------------------------- report test_1(r_value) #------------------------------------------------------------------------------- define r_value smallint output left margin 0 top margin 0 bottom margin 0 order by r_value # order external by r_value format after group of r_value display " ---------- > change of group ",r_value print " ---------- > change of group ",r_value on every row display " Row: ",r_value clipped print " Row: ",r_value clipped end report #---- End example TEST.4gl ----------- SOLVED Thanks to everyone for your help, especially Fernando and Art ----- Missatge Original ----- De: "Isidre Pons Roca" <ipons@base.cat> A: informix-list@iiug.org Enviat: Divendres, 30 de Novembre 30el 2012 10:30:11 Assumpte: Strange behavior : I4GL , transactions AND reports = Lost data Hi all, After a long fighting , we could not solve a very weird problem. In a program with I4GL transactions and reports, lost data in the report. (See example below) However, only if the report have an "order by" clause, never witout this clause or "order external by" clause. We tested two different environments and two different versions of the product with the same result. Test 1: Solaris 10, I4GL 7.50.FC1 Test 2: Centos 64b, I4GL 7.50.FC6 Someone can help us? What is wrong? Thanks in advance Isidre #----- Beguin example TEST.4gl---- #--------------------------------------------------------- # # Strange behavior I4GL : Transactions and reports # # (c) BASE - Gesti d'Ingressos # Isidre Pons # 11/30/2012 v 1.0 # #--------------------------------------------------------- database oartdb #------------------------------------------------------------------------------- main #------------------------------------------------------------------------------- define i smallint start report test_1 to "kk.out" for i = 1 to 10 begin work if (i mod 3) = 0 then display "Commited value :",i commit work else display "Rollback value :",i rollback work end if output to report test_1(i) end for finish report test_1 prompt "Press a key : " for char status end main #------------------------------------------------------------------------------- report test_1(r_value) #------------------------------------------------------------------------------- define r_value smallint output left margin 0 top margin 0 bottom margin 0 order by r_value # order external by r_value format after group of r_value display " ---------- > change of group ",r_value print " ---------- > change of group ",r_value on every row display " Row: ",r_value clipped print " Row: ",r_value clipped end report #---- End example TEST.4gl ----------- .