Mr. Rao. xBrowse bug? (SOLVED)

Post Reply
User avatar
ctoas
Posts: 103
Joined: Wed Oct 26, 2005 2:38 pm
Location: São Paulo - Brasil
Contact:

Mr. Rao. xBrowse bug? (SOLVED)

Post by ctoas »

Mr. Rao

In my previous post, you said that the way I built xBrowse was inadequate. Could you explain that?

The way you suggested it doesn't work properly, but the way I used it does it correctly.

See codes and equivalent images.

So it doesn't work

Image

Code: Select all

@ 0069,0000 XBROWSE oBrwLOTES OF oDlgLOTES SIZE 0520,0230 STYLE FLAT PIXEL NOBORDER DATASOURCE oRsLOTES ;
        COLUMNS PEGANOMELOTEAMENTO(oRsLOTES:loteamento,@cNOMELOTEAMENTO),"quadra","lote","rua" ;
        HEADERS "Loteamento","Quadra","Lote","Rua" ;
        COLSIZES 0455,0065,0045,0455 ;
           PICTURES "@!","99","999","@!"   
So it works

Image

Code: Select all

       @ 0069,0000 XBROWSE oBrwLOTES OF oDlgLOTES SIZE 0520,0230 STYLE FLAT PIXEL NOBORDER DATASOURCE oRsLOTES
            
        ADD TO oBrwLOTES DATA PEGANOMELOTEAMENTO(oRsLOTES:loteamento,@cNOMELOTEAMENTO) PICTURE "@!" HEADER "Loteamento" SIZE 0455
        ADD TO oBrwLOTES DATA oRsLOTES:quadra                                          PICTURE "@!" HEADER "99"        SIZE 0065
        ADD TO oBrwLOTES DATA oRsLOTES:lote                                            PICTURE "@!" HEADER "999"        SIZE 0045
        ADD TO oBrwLOTES DATA oRsLOTES:rua                                             PICTURE "@!" HEADER "Rua"        SIZE 0455 
I would like to understand why one way works and the other not even being the same despite an inadequate one.

Code: Select all

***************************************************************************************************
STATIC FUNCTION PEGANOMELOTEAMENTO(cLOTEAMENTO,cNOMELOTEAMENTO)
***************************************************************************************************
    
    IF oRsLOTEAMENTOS:Seek(cLOTEAMENTO) 
    cNOMELOTEAMENTO := STRZERO(cLOTEAMENTO,3) + " - " + ALLTRIM(oRsLOTEAMENTOS:nome)
    ELSE
        cNOMELOTEAMENTO := "Loteamento não encontrado"
    ENDIF

RETURN cNOMELOTEAMENTO
Last edited by ctoas on Sat Feb 20, 2021 4:48 pm, edited 1 time in total.
Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Mr. Rao. xBrowse bug?

Post by nageswaragunupudi »

Code: Select all

        COLUMNS { || PEGANOMELOTEAMENTO(oRsLOTES:loteamento,@cNOMELOTEAMENTO) },"quadra","lote","rua" ;
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
ctoas
Posts: 103
Joined: Wed Oct 26, 2005 2:38 pm
Location: São Paulo - Brasil
Contact:

Re: Mr. Rao. xBrowse bug?

Post by ctoas »

I hadn't thought of a code block.

Thanks.
Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
Post Reply