Difference between revisions of "FLDLIST()"

From Recital Documentation Wiki
Jump to: navigation, search
Line 1: Line 1:
 
==Class==
 
==Class==
Fields and Records
+
Table Basics
  
  
Line 22: Line 22:
 
<code lang="recital">
 
<code lang="recital">
 
procedure ExcelReport
 
procedure ExcelReport
select * from example order by state save as datafile&(getpid())
+
  select * from example order by state save as datafile&(getpid())
use datafile&(getpid()).dbf in 0
+
  use datafile&(getpid()).dbf in 0
copy to datafile&(getpid()).txt type delimited
+
  copy to datafile&(getpid()).txt type delimited
fieldList = fldlist()
+
  fieldList = fldlist()
use
+
  use
select example
+
  select example
showDocument("DemoReportData.xls?command=create;row=3;col=1;"+;
+
  showDocument("DemoReportData.xls?command=create;row=3;col=1;"+;
"title=<Demo Excel Report>;titleColor=23;columnTitles=&fieldList;"+;
+
    "title=<Demo Excel Report>;titleColor=23;columnTitles=&fieldList;"+;
"columnTitlesColor=24;stripeColor=20;subtotal=8;"+;
+
    "columnTitlesColor=24;stripeColor=20;subtotal=8;"+;
"subtotalcolumns=10,11,12;"+;
+
    "subtotalcolumns=10,11,12;"+;
"columnFormat=|||||||||$#,##0.00|$#,##0.00|$#,##0.00||;"+;
+
    "columnFormat=|||||||||$#,##0.00|$#,##0.00|$#,##0.00||;"+;
"subtotalBackColor=24;subtotalForeColor=55;"+;
+
    "subtotalBackColor=24;subtotalForeColor=55;"+;
"subtotalTitle=Sub-total for state: ","_blank", "datafile&(getpid()).txt")
+
    "subtotalTitle=Sub-total for state: ","_blank", "datafile&(getpid()).txt")
 
endproc
 
endproc
 
</code>
 
</code>
Line 43: Line 43:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Table Basics]]
 +
[[Category:Table Basics Functions]]

Revision as of 11:00, 11 June 2009

Class

Table Basics


Purpose

Function to return a comma separated list of field names


Syntax

FLDLIST([<workarea | alias>])


See Also

ADESC(), AFIELDS(), DBF(), FIELD(), FIELDNAME(), FILTER(), FLDCOUNT(), FMT(), INDEXKEY(), NDX()


Description

The FLDLIST() function returns a string containing a comma separated list of field names. The optional <workarea | alias> parameter can be used to operate on the table in the specified workarea number, or with the specified table alias. If the optional <workarea | alias> is not specified, FLDLIST() operates on the currently selected table. If there is no table selected or open with the specified alias name or in the specified workarea, FLDLIST() returns an error.


Example

procedure ExcelReport
  select * from example order by state save as datafile&(getpid())
  use datafile&(getpid()).dbf in 0
  copy to datafile&(getpid()).txt type delimited
  fieldList = fldlist()
  use
  select example
  showDocument("DemoReportData.xls?command=create;row=3;col=1;"+;
    "title=<Demo Excel Report>;titleColor=23;columnTitles=&fieldList;"+;
    "columnTitlesColor=24;stripeColor=20;subtotal=8;"+;
    "subtotalcolumns=10,11,12;"+;
    "columnFormat=|||||||||$#,##0.00|$#,##0.00|$#,##0.00||;"+;
    "subtotalBackColor=24;subtotalForeColor=55;"+;
    "subtotalTitle=Sub-total for state: ","_blank", "datafile&(getpid()).txt")
endproc


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer