ERROR ON RPREVIEW

User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

ERROR ON RPREVIEW

Post by Silvio.Falconi »

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


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
//----------------------------------------------------------------------------------//
 
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: ERROR ON RPREVIEW

Post by Antonio Linares »

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
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Post by Silvio.Falconi »

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
gkuhnert
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands
Contact:

Re: ERROR ON RPREVIEW

Post by gkuhnert »

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


#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
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Post by Silvio.Falconi »

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.
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
gkuhnert
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands
Contact:

Re: ERROR ON RPREVIEW

Post by gkuhnert »

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
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: ERROR ON RPREVIEW

Post by cnavarro »

C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Post by Silvio.Falconi »

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



Image
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Post by Silvio.Falconi »

cnavarro wrote:Silvio
Try with this and comment

http://forums.fivetechsupport.com/viewt ... 62&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.
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: ERROR ON RPREVIEW

Post by cnavarro »

Silvio
I'll try with your version
Please wait
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Post by Silvio.Falconi »

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Post by Silvio.Falconi »

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 !!!
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Post by Silvio.Falconi »

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!!!!
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Post by Silvio.Falconi »

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR ON RPREVIEW

Post by Silvio.Falconi »

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 !!!
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply