PDA

View Full Version : cWebColummImage losing focus when reading RowID



edcarlosp
3-Sep-2019, 01:45 PM
Eu tenho um cWebGrid, onde é preenchido manualmente uma nota "Set pbDataAware to False", possui 10 colunas e o último cWebColumnImage, que é necessário ler os dados da linha para abrir o arquivo PDF, quando for para a primeira linha. o arquivo PDF está correto, mas quando uma segunda linha perde o foco e abre o mesmo arquivo PDF, quando uma segunda vez abre o arquivo correto, dentro do Procedimento OnClick me traz Rowid a linha onde está o foco, deseja entrar ou que está fazendo com que esteja errado para capturar dados abra ou arquive corretamente.


A seguir, está o código do objeto cWebColumnImage:

[CODE]
OnClick String sImage String sRowId
String lsUrl lsFGDCTP_COD_EMP lsFGDCTP_COD_CVN lsFGDCTP_CBNOS_NUM
LiPos inteiro liRow RowID
riRowID
Forward Send OnClick sImage sRowId

Get fRetorna_Url_Padrao to lsUrl // WebApp.Src
Move (Trim (lsUrl)) para lsUrl
Move (Pos (". Html", lsUrl)) para paraPos
Move Move Move (liPos-6) (liPos-6) para liPos Move (liPos-6) para liPos Move (liPos-6)
Mover (Mid (lsUrl, liPos, 1)) para lsUrl

If (sRowID <> '') Iniciar
se (sImage => Imagens / report.bmp ") Iniciar o
envio do foco de oGGTPTP_Grid
Enviar gradeRefresh de oFGDCTP_Grid
Se CurrentRowId de oFGDCTP_DD para riRowID
Enviar FindByRowId de oFGDCTP_DD FGDCTP.File_Number riRowID
Enviar MoveToRowByID de oFGDCTP_Grid sRowID

WebGet psValue de oFGDCTP_COD_EMP para lsFGDCTP_COD_EMP
WebGet psValue de oFGDCTP_COD_CVN para lsFGDCTP_COD_CVN
WebGet psValue de oFGDCTP_CBNOS_NUM para lsFGDCTP_CBNOS_NUM

Append lsUrl 'Cobrança /' (Trim ( lsFGDCTP_COD_EMP)) '_' (Trim (lsFGDCTP_COD_CVN)) '_' (Trim (lsFGDCTP_CBNOS_NUM)) '.pdf'

Enviar ShowCustomer lsUrl
End
Caso contrário (sImage = "Images / sim.bmp") Envie para ShowInfoBox 'Boleto já quitado!' gsNome_Sistema
End
End_Procedure
[/ CODE]

Samuel Pizarro
3-Sep-2019, 08:51 PM
Carlos, next time please post thus in portuguese forum

Vincent Oorsprong
4-Sep-2019, 02:20 AM
Samuel, Edgar,

Moved the thread.

Samuel Pizarro
4-Sep-2019, 07:12 AM
Ed Carlos

Eu juro que havia visto esse post originalmente em ingles no forum , mas depois ele estava em portugues, e ainda por cima, parece ter sido traduzido automaticamente por alguma ferramenta de traducao.. ta super ruim de entender..

edcarlosp
9-Sep-2019, 09:26 AM
​I'm sorry Samuel also did not understand what happened, because I had posted in English and is now in Portuguese, but every way I have managed to solve this issue of RowId in another way, passing the recnum of my table and reading it later.
Thank you very much!

edcarlosp
9-Sep-2019, 09:30 AM
Vicent, I changed the subject but the word cWebColummImage to CWebColumnImage, but apparently it didn't work out and this translation disorder happened.

Sorry!