oracle-sqldeveloperplsqldeveloperguptateamdevelopercentura

How can I Load image from Centura


How can I Load an image.Jpg using Centura? then display it in Centura and be able to load this image as a logo in the qrp reports?


Solution

  • For loading the image into a centura image control by setting its property as shown in the below image.

    Loading image using image property

    In addition to this you can also load the image pragmatically using any of the below mentioned Sal functions,

    1.SalPicSetImage

    bOk = SalPicSetImage ( hWndPict, strImageBytes, nType ) Inserts the contents of a string to a picture object. The third parameter is a constant. Parameters hWndPict Window handle. The handle (or name) of a picture. strImageBytes String. String buffer which stores the image bytes. nType Number. The format of the picture contents:.Example for jpg - PIC_ImageTypJPEG

    2.SalPicSetFile

    bOk = SalPicSetFile ( hWndPict, strFileName ) Inserts a file's contents into a picture. Parameters hWndPict Window Handle. The handle (or name) of a picture. strFileName String. The name of the file whose contents are to be inserted into hWndPict.

    Steps for passing an image into Qrp

    1.Declare an Object in the qrp file, as shown in the below image

    Declaring an object in qrp file

    2.Assign the above mentioned object to Qrp picture as shown the image below,

    enter image description here

    3.Set the above mentioned object in the output list.(in centura application)

    4.Assign centura image contents into a longstring variable and set it in Input list.(In centura application)

    1. For copying centura image contents into string variable you can use SalPicGetString().