xBrowse Report and column pictures

Post Reply
AntoninoP
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy
Contact:

xBrowse Report and column pictures

Post by AntoninoP »

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

  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...
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: xBrowse Report and column pictures

Post by nageswaragunupudi »

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
AntoninoP
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy
Contact:

Re: xBrowse Report and column pictures

Post by AntoninoP »

I am not sure to understand the question, we created the column in this way:

Code: Select all | Expand

oCol := oList:AddCol()
oCol:bStrData := {|| GetPrice() }
oCol:cHeader := "Vendita"
oCol:cEditPicture := PICV
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: xBrowse Report and column pictures

Post by nageswaragunupudi »

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
Post Reply