Bingen
unread,Feb 10, 2012, 3:19:22 AM2/10/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro
I've founded a old response fron Sergey about this, don't run 100% but
with and adjust
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.
My Adjust is
for x := 1 to oDataSet:FieldCount()
if ValType(oDataSet:aFields[x]:nSQLType)="C" .And.
oDataSet:aFields[x]:nSQLType = "BLOB"
cStr+=oDataSet:FieldName(x) + "^b;"
else
cStr+=oDataSet:FieldName(x) + ";"
endif
next
Because nSqlType returns a literal with type of Sql field (may be an
bug on Xailer)
Regards