FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Perhaps there is an error or a bug .....
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Perhaps there is an error or a bug .....
Posted: Sun Nov 23, 2014 01:50 PM
today I recompiled my app with new 14.09 and I improved new xbrowse chart


on xbrowse I have ....



But then on Report I have ....



the charts are all the same ?

see for a sample the 5th line ("Rimborsi") chart

I have two data on July and August and the xbrowse chart are right but on report is bad

perhaps there is an error or bug ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Perhaps there is an error or a bug .....
Posted: Mon Nov 24, 2014 04:14 AM
Silvio,

These two lines look the same to me. I may be missing something :-)



regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Perhaps there is an error or a bug .....
Posted: Mon Nov 24, 2014 07:53 AM

Antonio .
I not understood... there 's no missing anything
I mean for the chart...is good on xbrowse but not good on the report
if you tried the test sample I sent you you can see the error

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Perhaps there is an error or a bug .....
Posted: Mon Nov 24, 2014 01:46 PM

Please assign
oCol:nChartMaxVal with Maximum value to be used.
Example
oCol:nChartMaxVal := 400 // or whatever can be the maximum value

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Perhaps there is an error or a bug .....
Posted: Mon Nov 24, 2014 06:03 PM
Please,
do you saw my test I sent you ?

this the source code ( I insert also the maxvalue) - use the dbf I sent you

the problem is on report while on xbrowse run ok

Code (fw): Select all Collapse
 
#include "FiveWin.ch"
#include "Report.ch"
#include "xBrowse.ch"
#include "constant.ch"


Function Test()
Local oDlg,oBrw

   Local nBottom   := 16.5
   Local nRight    := 120
   Local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local nHeight := nBottom * DLG_CHARPIX_H
   Local oFont

   Local aRowGrad := { { .5, RGB( 232, 241, 252 ), RGB(  232, 241, 252 ) }, ;
                 { .5, RGB( 210, 225, 244 ), RGB(  235, 243, 253 ) } }

   Local aSelGrad := { { .5, RGB( 255, 255, 251 ), RGB( 255, 237, 178 ) }, ;
                 { .5, RGB( 255, 218, 103 ), RGB( 255, 233, 162 ) } }




Local aData:={}
Local aMes:={ "Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Oct","Nov","Dic" }
Local aEntrate :={}
Local aUscite :={}
Local cClrEntrate    := 7031871
Local cClrUscite     := 204
Local oBtnChartType[2]
Local oBtnPrint
Local aGet[1]
Local nMaxvalue := 400

  Local aCanE :={ { "Gen", 0 }, { "Feb", 0 }, { "Mar", 0 }, { "Apr", 0 }, ;
                 { "Mag", 0 }, { "Giu", 0 }, { "Lug", 0 }, { "Ago", 0 }, ;
                 { "Set", 0 }, { "Oct", 0 }, { "Nov", 0 }, { "Dic", 0 }  }

   Local aCanU :={ { "Gen", 0 }, { "Feb", 0 }, { "Mar", 0 }, { "Apr", 0 }, ;
                 { "Mag", 0 }, { "Giu", 0 }, { "Lug", 0 }, { "Ago", 0 }, ;
                 { "Set", 0 }, { "Oct", 0 }, { "Nov", 0 }, { "Dic", 0 }  }



 USE MOVIMENTI ALIAS MV
 MV->(DbGoTop())

 MV->( DBEVAL( { || aCanE[ Month( MV->APFECHA ) ][ 2 ]+= IIF( MV->APTIPO="E", MV->APIMPTOTAL,0) } ) )
 MV->( DBEVAL( { || aCanU[ Month( MV->APFECHA ) ][ 2 ]+= IIF( MV->APTIPO="U", MV->APIMPTOTAL,0) } ) )





        For n=1 to len( aCanE)
            AADD(  aEntrate,aCanE[n][2])
         next n


        For n=1 to len( aCanU)
            AADD(  aUscite,aCanU[n][2])
         next n





   AAdd( aData, {'Entrate',  aEntrate[1], aEntrate[2], aEntrate[3],;
         aEntrate[4], aEntrate[5],  aEntrate[6], aEntrate[7],  aEntrate[8], ;
         aEntrate[9], aEntrate[10], aEntrate[11], aEntrate[12] } )


          AAdd( aData, {'Uscite',  aUscite[1], aUscite[2], aUscite[3],;
         aUscite[4], aUscite[5],  aUscite[6], aUscite[7],  aUscite[8], ;
         aUscite[9], aUscite[10], aUscite[11], aUscite[12] } )







        DEFINE FONT oFont   NAME 'TAHOMA' SIZE 0,-10


   DEFINE DIALOG oDlg SIZE nWidth, nHeight;
          TRANSPARENT  PIXEL TITLE "Test";
          FONT oFont


    @ 0, 2 XBROWSE oBrw;
          HEADERS  'Voci', 'Gen','Feb','Mar','Apr','Mag','Giu','Lug','Ago','Set','Ott','Nov','Dic';
          SIZE 470,100 PIXEL ;
          OF oDlg ;
          ARRAY aData  AUTOCOLS  FOOTERS


 oBrw:nStretchCol := STRETCHCOL_LAST



 WITH OBJECT oBrw
          :nMarqueeStyle := 4
          :bClrSelFocus  := { || { CLR_BLACK, aSelGrad } }
          :bClrRowFocus  := { || { CLR_BLACK, aRowGrad } }
          :nColDividerStyle    := LINESTYLE_LIGHTGRAY
          :lColDividerComplete := .t.
          :lRecordSelector     := .T.
   END





 WITH OBJECT  oBrw:AddCol()
      :cHeader          := "CHART"
      :aChartCols    := { 'Gen','Feb','Mar','Apr','Mag','Giu','Lug','Ago','Set','Ott','Nov','Dic' } // This also works
     * :nChartMaxVal     := 400
      :nWidth           := 120
      :aChartColors := IIf(LTRIM(oBrw:Voci:Value)=="Entrate",cClrEntrate,cClrUscite)

  END





 // FOOTERS
 AEval( oBrw:aCols, { |o| o:cEditPicture := '99,999.99', ;
                            o:nFooterType := AGGR_SUM, o:nWidth:= 50,    ;
                            o:bOnChange := { || oBrw:MakeTotals(),oBrw:RefreshFooters() } }, 2 )

    oBrw:Voci:cFooter := 'Totale'
    oBrw:nDataLines := 3
    oBrw:MakeTotals()
    oBrw:CreateFromCode()


       @100,2   BUTTON oBtnChartType[1] PROMPT "Bar" OF oDlg ;
       SIZE 25,15 PIXEL  ACTION ( oBrw:Chart:cChartType:= "BAR" ,oBrw:refresh())

       @100,30   BUTTON oBtnChartType[2] PROMPT "Line" OF oDlg ;
       SIZE 25,15 PIXEL  ACTION ( oBrw:Chart:cChartType:= "LINE" ,oBrw:refresh())

       @100,60   BUTTON  oBtnPrint PROMPT "Report" OF oDlg ;
       SIZE 25,15 PIXEL  ACTION  oBrw:Report()
       @ 105, 120 SAY "Select maxvalue:"    of  oDlg PIXEL
       @ 105, 160 get aget[1] var  nMaxvalue spinner  picture"9999"  of  oDlg PIXEL  on change  (oBrw:Chart:nChartMaxVal := nMaxvalue ,oBrw:refresh())




       ACTIVATE DIALOG oDlg CENTER ;
       on init aget[1]:nHeight:=21.4


RELEASE FONT oFont

       RETURN NIL




on xbrowse good





on report bad ( see the chart is the same )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Perhaps there is an error or a bug .....
Posted: Mon Nov 24, 2014 08:40 PM

Mr Silvio
I shall look into this.

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Perhaps there is an error or a bug .....
Posted: Tue Nov 25, 2014 06:07 PM

Maestro,
I hope you found a solution ....

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Perhaps there is an error or a bug .....
Posted: Thu Nov 27, 2014 11:19 AM

Mr. Nages,
also the colors not run ok

:aChartColors := iif(alltrim(oBrw:aCols[1]:value)="Entrate",CLR_HBLUE,CLR_RED)

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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

Continue the discussion