Show documents in VL Web
Posted: Wed Mar 22, 2017 2:18 am
Hi,
I'm rebuilding for a customer a VLF Windows system into VL Web.
In the existing VLF Windows system they have BLOB fields to show all kind of documents (for example PDF's using the AcrobatReader).
***********************************************
Mthroutine Name(umShowDoc)
If (#DocumentBLOB.FileName = '')
Use Builtin(MESSAGE_BOX_CLEAR)
Use Builtin(MESSAGE_BOX_ADD) With_Args('File failed to download from the document store')
Use Builtin(MESSAGE_BOX_SHOW) With_Args(OK OK ERROR)
Return
Endif
#PANL_Right.Style <= *NULL
Case Of_Field(#ufDocumentFormat.UpperCase)
When Value_Is(= 'PDF')
#ruAcrobatReaderWebEmbedded.umShowPDF Uvifilename(#DocumentBLOB.FileName) Uvishowscrollbar(True) Uvishowtoolbar(True)
#ruAcrobatReaderWebEmbedded.Visible := True
When Value_Is('= JPG' '= GIF' '= BMP' '= PNG')
* #axAdobeReader.Visible := False
#ruAcrobatReaderWebEmbedded.Visible := False
#uoImage <= #SYS_APPLN.CreateBitmap
#uoImage.FileName := #DocumentBLOB.FileName
#PANL_Right.Style <= #usImageStyle
#usBrush.Image <= #uoImage
Otherwise
* #axAdobeReader.Visible := False
#ruAcrobatReaderWebEmbedded.Visible := False
Define Field(#ufRetValue) Type(*dec) Length(7) Decimals(0)
Use Builtin(SYSTEM_COMMAND) With_Args(H #DocumentBLOB.Filename) To_Get(#ufRetValue)
Endcase
Endroutine
***********************************************
Can I do the same when I build this in VL Web????
Kind regards,
René
I'm rebuilding for a customer a VLF Windows system into VL Web.
In the existing VLF Windows system they have BLOB fields to show all kind of documents (for example PDF's using the AcrobatReader).
***********************************************
Mthroutine Name(umShowDoc)
If (#DocumentBLOB.FileName = '')
Use Builtin(MESSAGE_BOX_CLEAR)
Use Builtin(MESSAGE_BOX_ADD) With_Args('File failed to download from the document store')
Use Builtin(MESSAGE_BOX_SHOW) With_Args(OK OK ERROR)
Return
Endif
#PANL_Right.Style <= *NULL
Case Of_Field(#ufDocumentFormat.UpperCase)
When Value_Is(= 'PDF')
#ruAcrobatReaderWebEmbedded.umShowPDF Uvifilename(#DocumentBLOB.FileName) Uvishowscrollbar(True) Uvishowtoolbar(True)
#ruAcrobatReaderWebEmbedded.Visible := True
When Value_Is('= JPG' '= GIF' '= BMP' '= PNG')
* #axAdobeReader.Visible := False
#ruAcrobatReaderWebEmbedded.Visible := False
#uoImage <= #SYS_APPLN.CreateBitmap
#uoImage.FileName := #DocumentBLOB.FileName
#PANL_Right.Style <= #usImageStyle
#usBrush.Image <= #uoImage
Otherwise
* #axAdobeReader.Visible := False
#ruAcrobatReaderWebEmbedded.Visible := False
Define Field(#ufRetValue) Type(*dec) Length(7) Decimals(0)
Use Builtin(SYSTEM_COMMAND) With_Args(H #DocumentBLOB.Filename) To_Get(#ufRetValue)
Endcase
Endroutine
***********************************************
Can I do the same when I build this in VL Web????
Kind regards,
René