First i want to thank everybody for answers to my questions here.
Now the next question:
I am trying FastReports, with an oSqlQuery.
What should be the codeblock to get the value of the fields?
//---------------------------------------------------------- --------------------
function SetXailerDataSet(oFrManager, cFrAlias, oDataSet)
//---------------------------------------------------------- --------------------
local cStr:='', x
// get the fieldnames from the dataset. This works fine
for x := 1 to len( oDataSet:aFields)
cStr += oDataSet:aFields[x]:cName + ";"
next
aVelden := oDataSet:aFields
oFrManager:SetUserDataSet(cFrAlias, cStr,;
{||oDataSet:GoTop()}, {||oDataSet:Skip(1)}, ;
{||oDataSet:Skip(-1)}, {||oDataSet:Eof()},;
// here comes a codeblock to get the field values, but what should it be?
{|xxxxxxxxxxxx|xxxxxxxxxxxx})
Return Nil
// for a dbf dataset the code example from fastreports is
//////////////////////////////////////////////////////////// ///////////
function DoWAUserDS()
SELECT Items
SET ORDER TO 3
FrPrn:SetUserDataSet("Parts in oders", "PartNo;Part;Total qty;Price",;
{|| Parts->( DbGoTop() )} ,;
{|| Parts->( DbSkip(1) )},;
{|| Parts->( DbSkip(-1) )},;
{|| Parts->( Eof() )},;
{|cField| GetDSValue(cField)})
//////////////////////////////////////////////////////////// ///////////
function GetDSValue(cField)
local RES
DO CASE
CASE cField == "PartNo"
RETURN Parts->PartNo
CASE cField == "Part"
RETURN Parts->Descriptio
CASE cField == "Total qty"
SELECT Items
OrdScope(0, Parts->PartNo)
OrdScope(1, Parts->PartNo)
SUM QTY TO RES
RETURN RES
CASE cField == "Price"
RETURN Parts->ListPrice
ENDCASE
return nil
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
get dataset value
-
- Mensajes: 44
- Registrado: Dom Abr 19, 2009 10:01 am