Xbrowse or Report Bug

Xbrowse or Report Bug

Postby Silvio.Falconi » Mon Jan 15, 2018 4:28 pm

I have this xbrowse


Image

and I made oBrowse:report()

Image

I made
@ 0, 05 XBROWSE oBrowse OF oDlg ;
SIZE 315,200 PIXEL ;
CURSOR oCursorBtn NOBORDER


oBrowse:cAlias := "MV"


oCol := oBrowse:AddCol()
oCol:bStrData := { || Cf(MV->data) }
oCol:cHeader := i18n( "Data" )
oCol:nWidth := 80

oCol := oBrowse:AddCol()
oCol:bStrData := { || MV->attivita }
oCol:cHeader := i18n( "Attività" )
oCol:nWidth := 200

oCol := oBrowse:AddCol()
oCol:bStrData := { || MV->causale }
oCol:cHeader := i18n( "Causale" )
oCol:nWidth := 200

oCol := oBrowse:AddCol()
oCol:bStrData := { || round(MV->importo,2) }
oCol:cHeader := i18n( "Importo Totale" )
oCol:nWidth := 150
oCol:nDataStrAlign := AL_RIGHT
oCol:cEditPicture := PictEuros()
oCol:lTotal := .t.
oCol:nTotal :=0
oCol:nFooterType := AGGR_SUM
oCol:nFootStrAlign := AL_RIGHT


FUNCTION PictEuros()
RETURN( "@E 9,999,999,999.99" )




Another test
I change on this type

oCol := oBrowse:AddCol()
oCol:bStrData := { || Cf(MV->data) }
oCol:cHeader := i18n( "Data" )
oCol:nWidth := 80

oCol := oBrowse:AddCol()
oCol:bStrData := { || MV->attivita }
oCol:cHeader := i18n( "Attività" )
oCol:nWidth := 200

oCol := oBrowse:AddCol()
oCol:bStrData := { || MV->causale }
oCol:cHeader := i18n( "Causale" )
oCol:nWidth := 200

oCol := oBrowse:AddCol()
oCol:bStrData := { || MV->importo}
oCol:cHeader := i18n( "Importo Totale" )
oCol:nWidth := 150

oBrowse:lHScroll := .f.
oBrowse:SetRDD()
oBrowse:CreateFromCode()
oBrowse:lFooter:=.t.
oBrowse:MakeTotals()

the xbrowse seems ok

Image

and I try to make a report

Image

but the report is bad


the importo is numeric field
{ "IMPORTO", "N", 9, 2 }
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: 7086
Joined: Thu Oct 18, 2012 7:17 pm

Re: Xbrowse or Report Bug

Postby James Bott » Mon Jan 15, 2018 9:14 pm

Silvio,

This looks like some kind of math bug in Harbour/xHarbour that we just found in you other problem.

I workaround might be to convert all the numbers to text when importing them to the xBrowse and also right justify the column.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Xbrowse or Report Bug

Postby Silvio.Falconi » Tue Jan 16, 2018 11:24 am

there is a bug on harbour
not run round function
but now I tried with
#xtranslate round(<nVal>,<nDec>) => val(str(<nVal>,20,<nDec>))
and run ok

converting my applications to Harbor made me waste only a lot of precious time
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: 7086
Joined: Thu Oct 18, 2012 7:17 pm

Re: Xbrowse or Report Bug

Postby nageswaragunupudi » Tue Jan 16, 2018 1:37 pm

Please replace this part of the code:
Code: Select all  Expand view  RUN
oCol := oBrowse:AddCol()
oCol:bStrData := { || round(MV->importo,2) }
oCol:cHeader := i18n( "Importo Totale" )
oCol:nWidth := 150
oCol:nDataStrAlign := AL_RIGHT
oCol:cEditPicture := PictEuros()
oCol:lTotal := .t.
oCol:nTotal :=0
oCol:nFooterType := AGGR_SUM
oCol:nFootStrAlign := AL_RIGHT
 


with
Code: Select all  Expand view  RUN
oCol := oBrowse:AddCol()
oCol:bEditValue := { || round(MV->importo,2) }
oCol:cHeader := i18n( "Importo Totale" )
oCol:nWidth := 150
oCol:nDataStrAlign := AL_RIGHT
oCol:cEditPicture := PictEuros()
oCol:nFooterType := AGGR_SUM
oCol:nFootStrAlign := AL_RIGHT
 


Please also remove the #xtranslate for round.
Please use Harbour's built in Round()

=======
OR
=======
You send me the DBF
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10681
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Xbrowse or Report Bug

Postby James Bott » Tue Jan 16, 2018 3:33 pm

Silvio,

there is a bug on harbour
not run round function


Can you give us an example?

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Xbrowse or Report Bug

Postby nageswaragunupudi » Tue Jan 16, 2018 3:59 pm

Mr James

There is no bug in Harbour.
It is all in the way you write the browse code.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10681
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Xbrowse or Report Bug

Postby Silvio.Falconi » Tue Jan 16, 2018 6:32 pm

Rao,
I tried as you sad but it make error here
when I insert #translate string run perfectly
As you told me I can send you a test
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: 7086
Joined: Thu Oct 18, 2012 7:17 pm

Re: Xbrowse or Report Bug

Postby nageswaragunupudi » Tue Jan 16, 2018 10:17 pm

Silvio.Falconi wrote:Rao,
I tried as you sad but it make error here
when I insert #translate string run perfectly
As you told me I can send you a test

Please just send me the DBF
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10681
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Xbrowse or Report Bug

Postby Silvio.Falconi » Wed Jan 17, 2018 9:18 pm

Now seem run ok
perhaps I found the error
oCol:lTotal := .t.
oCol:nTotal :=0
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: 7086
Joined: Thu Oct 18, 2012 7:17 pm

Re: Xbrowse or Report Bug

Postby nageswaragunupudi » Wed Jan 17, 2018 11:27 pm

Silvio.Falconi wrote:Now seem run ok
perhaps I found the error
oCol:lTotal := .t.
oCol:nTotal :=0


Do you now mean, there is no bug in xbrowse or report or round function of Harbour?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10681
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Xbrowse or Report Bug

Postby Silvio.Falconi » Thu Jan 18, 2018 10:53 am

perhaps on win 10 because I try on win7 and run ok
I not Know How and why
but I published snapshot you saw
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: 7086
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: wmormar and 35 guests