xBrowse Report and column pictures

xBrowse Report and column pictures

Postby AntoninoP » Thu Mar 22, 2018 9:39 am

Hello,
I see a strange behavior using oBrowse:Report(cTitle):
On screen I have this:
Image
on Report I have this:
Image
I investigated a little and found those lines of code on MakeRepCol
Code: Select all  Expand view
  if oXCol:bEditValue != nil
      cPic  := oXCol:cEditPicture
   endif

so, making a report the the picture is used only when bEditValue is defined, instead in all other cases it is used to transform the value to show...
I think the picture, despite the name, is used also when is not Edit...
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: xBrowse Report and column pictures

Postby nageswaragunupudi » Thu Mar 22, 2018 9:59 am

so, making a report the the picture is used only when bEditValue is defined, instead in all other cases it is used to transform the value to show...

If not bEditValue, may I know what did you use in this case?
Did you use FWH 18.02 ?
Regards

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

Re: xBrowse Report and column pictures

Postby AntoninoP » Thu Mar 22, 2018 10:38 am

I am not sure to understand the question, we created the column in this way:
Code: Select all  Expand view
oCol := oList:AddCol()
oCol:bStrData := {|| GetPrice() }
oCol:cHeader := "Vendita"
oCol:cEditPicture := PICV
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: xBrowse Report and column pictures

Postby nageswaragunupudi » Thu Mar 22, 2018 11:14 am

Please try changing bStrData as bEditValue.

Kindly note that usage of bStrData was deprecated almost ten years back, i.e., from March 2008. Even earlier, bStrData was supposed to return a formatted string, though some tolerance is built into xbrowse to allow bStrData returning non-character values.

Kindly read whatsnew.txt of March 2008.

We suggest using bEditValue as a SETGET block returning value of any type and optional cEditPicture for formatting. bStrData is constructed internally by XBrowse, using bEditValue and cEditPicture.

You made a valid point that you understood cEditPicture to be used only for editing. I agree if we name bEditValue and cEditPicture as bValue and cPicture, they would convey the right meaning. But we are continuing the same names that were created at the time xbrowse was first created.

We also recommend using command syntax to define xbrowse, without forgetting to mention the datasource while creating xbrowse. This enables realisation of full potential of xbrowse.
Regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 47 guests