ERROR ON RPREVIEW

ERROR ON RPREVIEW

Postby Silvio.Falconi » Wed Jul 19, 2017 7:39 am

On My application there is this error
but only on a Function when I try to print an array with report class

type : aBilancio[x,x]

1. error the menu is big lines
2. the menu have 2007 style

Image

this is my function use Treport

where is the error ?


Code: Select all  Expand view  RUN


Function Report_Nuovo_Bilancio_Trimestre(aBilancio)
            Local  i:= 1
            Local oReport
            Local cTitulo1 := "Bilancio Annuale"
            Local cTitulo2 := "Esercizio " +rtrim(oApp:cYearPath)
            Local cTitulo3 := IIF(!EMPTY(cDevActivitad),"["+cDevActivitad+"]","["+"Tutte le attività"+"]")
            Local oFont1
            Local oFont2
            Local oFont3
            Local oFont4
            Local oPen1,oPen2
            Local cFooter


   


     DEFINE PEN oPen1 WIDTH 2 COLOR CLR_HGRAY
     DEFINE PEN oPen2 WIDTH 1 COLOR CLR_HGRAY


     DEFINE FONT oFont1 NAME "Courier New" SIZE 0,-10
     DEFINE FONT oFont2 NAME "Courier New" SIZE 0,-10
     DEFINE FONT oFont3 NAME "Courier New" SIZE 0,-10

       oFont4 := TFont():New( "ARIAL", 0, -69,,,220,,,,,,,,,, oReport, ) // per scritta protezione





         REPORT oReport ;
         TITLE  " ",cTitulo1,cTitulo2,iif(cTitulo3!=NIL,cTitulo3," ") CENTERED;
         FONT   oFont1, oFont2, oFont3 ,oFont4;
          PEN    oPen1, oPen2 ;
         HEADER ' ', oApp():cAppName+oApp():cVersion, cFooter   ;
         FOOTER cFooter, "Data: "+dtoc(date())+ "   Pagina.: "+str(oReport:nPage,3) ;
         CAPTION oApp():cAppName+oApp():cVersion PREVIEW





          COLUMN TITLE "Causale " ;
              DATA aBilancio[i,1] ;
              SIZE 30  GRID 2

       /* COLUMN TITLE "" ;
              DATA aBilancio[i,2] ;
              SIZE 25 */


          COLUMN TITLE "Primo Trimestre " ;
              DATA aBilancio[i,2] ;
              picture "999,999.99"  ;
               SIZE 20 ;
                FONT 2             ;
               RIGHT   GRID 2

           COLUMN TITLE "Secondo Trimestre " ;
              DATA aBilancio[i,3] ;
              picture "999,999.99"  ;
               SIZE 20 ;
                FONT 2             ;
               RIGHT   GRID 2

            COLUMN TITLE "Terzo Trimestre " ;
              DATA aBilancio[i,4] ;
              picture "999,999.99"  ;
               SIZE 20 ;
                FONT 2             ;
               RIGHT  GRID 2

             COLUMN TITLE "Quarto Trimestre " ;
              DATA aBilancio[i,5] ;
              picture "999,999.99"  ;
               SIZE 20 ;
                FONT 2             ;
               RIGHT   GRID 2


             COLUMN TITLE "Totale Annuale  " ;
              DATA aBilancio[i,6] ;
              picture "999,999.99"  ;
               SIZE 20 ;
                FONT 2             ;
               RIGHT    ;
               GRID 2




             GROUP ON aBilancio[i,1];
             HEADER "" ;
             FOOTER ""


       END REPORT

      oReport:bSkip := {|| i++  }
      oReport:bInit := {|| i := 1 }

         oReport:lJoin :=  .T.

      ACTIVATE REPORT oReport WHILE i <= LEN( aBilancio )
             


     oFont1:End()
     oFont2:End()
     oFont3:End()
     oFont4:End()
     oPen1:End()
     oPen2:End()
   RETURN nil
//----------------------------------------------------------------------------------//
 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Postby Antonio Linares » Wed Jul 19, 2017 9:10 am

Dear Silvio,

Please provide a self contained PRG, to copy, paste and build it so tech support goes faster :-)

many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: ERROR ON RPREVIEW

Postby Silvio.Falconi » Wed Jul 19, 2017 9:20 am

SOMEONE CHANGED MENU CLASS


this error not come allways but sometimes
on that function I use ten dbfs and make many operations to save balance on a array
How I can make a smal test for you ?
On oldest release of fwh run ok same source codes I convert it on February 2017 and there are problems
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Postby gkuhnert » Wed Jul 19, 2017 9:41 am

Antonio, Silvio,

some variable defitinions obviously come from outside but are just being used for titles.
I quickly made a sample, a Bilancio is just a small array now!



Code: Select all  Expand view  RUN


#include "FiveWin.ch"
#include "report.ch"

static oWnd

//----------------------------------------------------------------------------//

function Main()

   local oWndEdit, oBar, oIcon, oImage
   local cName := "FiveWin power"

   DEFINE WINDOW oWnd FROM 1, 1 TO 20, 70 TITLE "I am the MDI Frame" ;
      MDI ;
      MENU BuildMenu() ; // COLOR "GR+*/RB"
      ICON oIcon

   SET MESSAGE OF oWnd TO "Startfenster CTO Testumgebung"

   ACTIVATE WINDOW oWnd MAXIMIZED

return nil

//----------------------------------------------------------------------------//

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "&Program"
      MENU
            MENUITEM "&Report" ACTION Report_Nuovo_Bilancio_Trimestre()
         SEPARATOR
         MENUITEM "&End..." ACTION oWnd:End()
      ENDMENU

   ENDMENU

return oMenu

//----------------------------------------------------------------------------//

Function Report_Nuovo_Bilancio_Trimestre()
   Local  i:= 1
   Local oReport
   Local cTitulo1 := "Bilancio Annuale"
   Local cTitulo2 := "Esercizio "
   Local cTitulo3 := "Titulo 3"
   Local oFont1
   Local oFont2
   Local oFont3
   Local oFont4
   Local oPen1,oPen2
   Local cFooter
    local aBilancio

        aBilancio := {;
            {"a", 5, 10, 20, 22, 37},;
            {"a", 4, 12, 25, 24, 33},;
            {"b", 3, 13, 24, 52, 34},;
            {"b", 7, 16, 21, 32, 1},;
            {"c", 8, 11, 22, 22, 12};
        }

     DEFINE PEN oPen1 WIDTH 2 COLOR CLR_HGRAY
     DEFINE PEN oPen2 WIDTH 1 COLOR CLR_HGRAY

     DEFINE FONT oFont1 NAME "Courier New" SIZE 0,-10
     DEFINE FONT oFont2 NAME "Courier New" SIZE 0,-10
     DEFINE FONT oFont3 NAME "Courier New" SIZE 0,-10

     oFont4 := TFont():New( "ARIAL", 0, -69,,,220,,,,,,,,,, oReport, ) // per scritta protezione

         REPORT oReport ;
         TITLE  " ",cTitulo1,cTitulo2,iif(cTitulo3!=NIL,cTitulo3," ") CENTERED;
         FONT   oFont1, oFont2, oFont3 ,oFont4;
         PEN    oPen1, oPen2 ;
         HEADER ' ', "header", cFooter   ;
         FOOTER cFooter, "Data: "+dtoc(date())+ "   Pagina.: "+str(oReport:nPage,3) ;
         CAPTION "caption" PREVIEW

          COLUMN TITLE "Causale " ;
              DATA aBilancio[i,1] ;
              SIZE 30  GRID 2

       /* COLUMN TITLE "" ;
              DATA aBilancio[i,2] ;
              SIZE 25 */


          COLUMN TITLE "Primo Trimestre " ;
              DATA aBilancio[i,2] ;
              picture "999,999.99"  ;
               SIZE 20 ;
                FONT 2             ;
               RIGHT   GRID 2

           COLUMN TITLE "Secondo Trimestre " ;
              DATA aBilancio[i,3] ;
              picture "999,999.99"  ;
               SIZE 20 ;
                FONT 2             ;
               RIGHT   GRID 2

            COLUMN TITLE "Terzo Trimestre " ;
              DATA aBilancio[i,4] ;
              picture "999,999.99"  ;
               SIZE 20 ;
                FONT 2             ;
               RIGHT  GRID 2

             COLUMN TITLE "Quarto Trimestre " ;
              DATA aBilancio[i,5] ;
              picture "999,999.99"  ;
               SIZE 20 ;
                FONT 2             ;
               RIGHT   GRID 2


             COLUMN TITLE "Totale Annuale  " ;
              DATA aBilancio[i,6] ;
              picture "999,999.99"  ;
               SIZE 20 ;
                FONT 2             ;
               RIGHT    ;
               GRID 2




             GROUP ON aBilancio[i,1];
             HEADER "" ;
             FOOTER ""


       END REPORT

      oReport:bSkip := {|| i++  }
      oReport:bInit := {|| i := 1 }

         oReport:lJoin :=  .T.

      ACTIVATE REPORT oReport WHILE i <= LEN( aBilancio )



     oFont1:End()
     oFont2:End()
     oFont3:End()
     oFont4:End()
     oPen1:End()
     oPen2:End()
   RETURN nil
 
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
 
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands

Re: ERROR ON RPREVIEW

Postby Silvio.Falconi » Wed Jul 19, 2017 9:56 am

I tried also I and on test not make error I tried with Local aBilancio:=array(10,6)

For My application I compiled with fwh 15 and there was not error
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20140725)
FiveWin Version: FWHX 15.01

I compile with Feb 17 make error

not depend from array abilancio
Last edited by Silvio.Falconi on Wed Jul 19, 2017 9:58 am, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Postby gkuhnert » Wed Jul 19, 2017 9:58 am

I tried with FHW1706 and BCC7 + xHarbour (1.2.3.10172, 18.12.2016), no error. I also tried with FWH1706 and MSVC2017 + harbour (20170325), no error too!
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
 
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands

Re: ERROR ON RPREVIEW

Postby cnavarro » Wed Jul 19, 2017 10:04 am

Silvio
Try with this and comment

viewtopic.php?f=3&t=34262&start=0
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: ERROR ON RPREVIEW

Postby Silvio.Falconi » Wed Jul 19, 2017 10:04 am

I insert your array before the REPORT COMMAND on my application and you must see what happen ....



Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Postby Silvio.Falconi » Wed Jul 19, 2017 10:06 am

cnavarro wrote:Silvio
Try with this and comment

viewtopic.php?f=3&t=34262&start=0


I allready tried with these modificatins

MENU oMenu

oMenu:l2007 := ( nStyle == 2007 )
oMenu:l2010 := ( nStyle == 2010 )
oMenu:l2013 := ( nStyle == 2013 )
oMenu:l2015 := ( nStyle == 2015 )

oMenu:lMenuBar := .T.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Postby cnavarro » Wed Jul 19, 2017 10:13 am

Silvio
I'll try with your version
Please wait
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: ERROR ON RPREVIEW

Postby Silvio.Falconi » Wed Jul 19, 2017 10:16 am

I treied to move these functions on another new file prg

Nuovo_Bilancio_Trimestre(lSaldo,oGrid)

Report_Nuovo_Bilancio_Trimestre(aBilancio)

but I have the same error
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Postby Silvio.Falconi » Wed Jul 19, 2017 10:52 am

Stop
Perhaps I found the error


I rem all the first function where I create the array and now run ok

Now I 'm searching the error on my function ...it's very strange !!!
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Postby Silvio.Falconi » Wed Jul 19, 2017 11:23 am

NO I not found the errror on my function ... there is no logic error

I not call any functions of menu of Rpreview or commans or obj of Menuitem or menu.prg casses

I use my variables

I really not understood!!!!
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Postby Silvio.Falconi » Wed Jul 19, 2017 1:32 pm

now I made a test with only that functions and run ok

I 'm thinking it cannot be an error from my sources but somthing U changed on menu class
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Postby Silvio.Falconi » Wed Jul 19, 2017 1:49 pm

Dear Antonio, Cristobal, Gilbert

I compiled with January 2015 and it run ok

Image


you changed something to menu or menuitem classes or another class , I am sure now !!!
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7068
Joined: Thu Oct 18, 2012 7:17 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Otto and 74 guests

cron