Página 1 de 1

Cargar imagen de campo Stream con FastReport a un oPicture en el reporte

Publicado: Mié Sep 23, 2009 7:10 pm
por Diego Ferreira
Hola a todos...!
tengo un dataset con un campo con imagenes en formato stream y quiero
que se vean en un objeto oPicture del fastreport es decir hacerle un
Loadfromstream al picture...!
Mil gracias de antemano !

Cargar imagen de campo Stream con FastReport a un oPicture en el reporte

Publicado: Jue Sep 24, 2009 9:32 am
por Spirin Sergey
Hello, Diego,
Starting with FRH 4.8 use such version of SetXailerDataSet()-function.
function SetXailerDataSet(oFrManager, cFrAlias, oDataSet)
local cStr:='', x
for x := 1 to oDataSet:FieldCount()
if oDataSet:aFields[x]:nSQLType = 205
cStr+=oDataSet:FieldName(x) + "^b;"
else
cStr+=oDataSet:FieldName(x) + ";"
endif
next
oFrManager:SetUserDataSet(cFrAlias, cStr,;
{||oDataSet:GoTop()}, {||oDataSet:Skip(1)}, ;
{||oDataSet:Skip(-1)}, {||oDataSet:Eof()},;
{|cField|oDataSet:oFieldByName(cField):FieldGet()})
Return Nil
(aFields[x]:nSQLType = 205) is tested with ADO. If in your dataset binary
field has another nSQLType-value then add it too.
In report simply set DataSet and DataField properties for TfrxPictureView
object.
Spirin Sergey.
"Paritet Soft" Company.
FRH sales: http://www.paritetsoft.ru/frh.htm
FRAX sales: http://www.paritetsoft.ru/frax.htm
"Diego Ferreira" <diego.datamatic@hotmail.com> ???????/???????? ? ????????
?????????: news:[email=4aba5682@svctag-j7w3v3j....]4aba5682@svctag-j7w3v3j....[/email]
> Hola a todos...!
>
> tengo un dataset con un campo con imagenes en formato stream y quiero que
> se vean en un objeto oPicture del fastreport es decir hacerle un
> Loadfromstream al picture...!
>
> Mil gracias de antemano !