Stonefield Query maintains report, folder, and template definitions in a table called Reports.DBF. You can add or modify records in this table yourself using Visual FoxPro or the Visual FoxPro OLE DB provider, but be sure that each field contains a reasonable value or Stonefield Query will likely crash.
RECTYPE, a single-character column, indicates the type of a record. The values are:
R: report
F: folder
T: template
The ID column contains a unique ID for each record. The contents of the rest of the columns depend on the record type.
The following describes the structure of this table.
Report Records
Field | Purpose |
---|---|
RECTYPE | "R" |
NAME | The name of the report as the user sees it. |
REPORTFILE | The name of the report file for external reports (that is, Visual FoxPro or Crystal Reports). |
REPORTCLS | The class used for this report. It contains SFReportQuick for a quick report, SFReportXTab for a cross-tab report, SFReportLabel for labels, SFReportChart for a chart report, SFReportFRX for a Visual FoxPro FRX report, or SFReportCrystal for a Crystal Reports report. |
REPORTLIB | The library containing the class specified in REPORTCLS. This always contains either SFReports.VCX, SFRXTab.VCX, or SFRCrystal.VCX. |
FOLDERS | A comma-delimited list of the ID values of the folders the report belongs in. |
DATAGROUP | The data group used for this report. This is blank if you don't use data groups. |
STDFILT | An expression representing a "standard" filter applied to the data. This filter is not shown to the user and is ANDed with any filter specified by the user. An example is a U.S. customer report, in which STDFILT contains:
CUSTOMER.COUNTRY = 'U.S.' The user can specify any additional filter they want (if they don't specify anything, they get a list of all U.S. customers), but they cannot see nor can they change this standard filter. You can specify an expression that's evaluated at runtime by prefixing it with "=." |
ALLOWFILT | If this is True (which is normally the case), the user can define a filter for this report. You may set this to False if the report has a standard (STDFILT column) or saved (FILTER column) filter and you don't want the user to specify anything else. |
ALLOWSORT | If this is True, the user can specify the sort order for the report. You'll likely want to set this to False for any report that uses group expressions. |
SORT | This memo field contains XML defining how the data is sorted for this report. The XML has the following structure:
<sortfields> <sortfield> <fieldname>aliased field name for first sort field</fieldname> <ascending>"true" for ascending, "false" for descending</ascending> <group>"true" if this is a grouped field</group> <order>numeric order value</order> </sortfield> <sortfield> <fieldname>aliased field name for second sort field</fieldname> <ascending>"true" for ascending, "false" for descending</ascending> <group>"true" if this is a grouped field</group> <order>numeric order value</order> </sortfield> additional <sortfield> nodes as necessary </sortfields> |
FIELDS | This memo field contains XML defining the fields used in the report. The XML has the following structure:
<fields> <field> <fieldname>aliased field name</fieldname> <heading>column heading</heading> <order>numeric field order</order> <width>width</width> <fontbold>"true" for bold</fontbold> <fontitalic>"true" for italic</fontitalic> <fontunderline>"true" for underline</fontunderline> <alignment>numeric alignment value (0 = left, 1 = center, 2 = right)</alignment> <format>format setting</format> <inputmask>picture setting</inputmask> <hposition>horizontal position; -1 for automatic</hposition> <vposition>vertical position; -1 for automatic</vposition> <group>numeric group number; 0 if not grouped</group> <chart>numeric chart number: 0 for values field, 1 for category field, 2 for series field</chart> <chartorder>numeric field order for charts</chartorder> <chartinputmask>picture setting for charts</chartinputmask> <chartformat>format setting for charts</chartformat> <totaltype>first letter of the total type (N = none)</totaltype> <charttotaltype>first letter of the total type (N = none) for charts</charttotaltype> <forecolor>foreground RGB value (-1 = default)</forecolor> <backcolor>-background RGB value (-1 = default)</backcolor> <suppress>"true" to suppress repeating values</suppress> <groupcount>"true" to show count in group footer</groupcount> <fontname>font name (blank for default)</fontname> <fontsize>font size (blank for default)</fontsize/> <autofit>"true" for auto-fit</autofit> <newpage>"true" to start each group on new page</newpage> <resetpage>"true" to reset the page number to 1</resetpage> <descending>"true" to sort group fields descending</descending> <includeallfields>this element isn't used anymore, but is still present for backward compatibility; it's always "false" in new reports</includeallfields> <aliascaption>the table caption</aliascaption> <bookmark>"true" to create a bookmark</bookmark> <datatrim>numeric trimming value; 1 = word wrap, 2 = cut off with ellipsis at end, 3 = cut off with ellipsis in middle</datatrim> <memberdata><![CDATA[additional formatting information]]></memberdata> <usedefaultformat>"true" to use default format</usedefaultformat> <usedefaultformatchart>"true" to use default format for charts</usedefaultformatchart> <groupononeline>"true" to include all fields in the group header on one line</groupononeline> <nototalsforonerecord>"true" to not show a group footer band if there's only one record in the group</nototalsforonerecord> <showpercent>"true" to display a "% of total" field for this field</showpercent> </field> additional <field> nodes as necessary </fields> |
COMMENTS | Comments about the report shown to the user in the Information page in the Reports Explorer. |
REP_TYPE | The report type code: "Q" for quick report, "E" for external report, "X" for cross-tab report, "L" for label, "D" for a dashboard, "B" for a batch report, "C" for a chart, "G" for a gauge, or "Y" for Crystal report. |
FOOTER | Text to print in the footer of the report; this is only used by quick and cross-tab reports. |
HEADER | Text to print in the header of the report; this is only used by quick and cross-tab reports. |
LEFTMARGIN | The left margin (in characters) for the report; this is only used by quick and cross-tab reports. |
DOQUERY | If this memo field isn't empty, Stonefield Query assumes it contains code and executes that code rather than creating and executing a SQL statement for the report. |
FILTER | This memo field contains XML specifying the filter conditions for the report.
<conditions> <condition> <connection>The connection to the previous condition</connection> <fieldname>Aliased field name</fieldname> <operclass>Stonefield Query class used for filter operator</operclass> <values><![CDATA[<value>filter value</value>]]></values> <display><![CDATA[filter expression as the user sees it]]></display> <case>"true" for case-sensitive filter</case> <prompt>"true" for ask-at-runtime</prompt> <valuetype>type of value: "Value," "Fields,", or "Expression"</valuetype> </condition> additional <condition> nodes as necessary </conditions> |
REPORTPROP | This memo field contains additional information about the report, stored as XML. As an example of its use, information about labels goes in this field. |
ONSELECT | This memo field contains any code automatically executed when the specified report is selected. |
ORIENTAT | The orientation to use for the report. 0 means "automatic," 1 means use portrait, and 2 means use landscape. |
FRXFILE | Contains XML for an advanced layout report. |
AFTERRUN | If this memo field isn't empty, Stonefield Query assumes it contains code and executes that code after a report has been run. |
SUMMARY | This contains True if Summary was selected in the Options page of the Reports Explorer for this report. |
SHOWFILTER | This contains True if the filter is included in the report header. |
BEFOREDATA | If this memo field isn't empty, Stonefield Query assumes it contains code and executes that code before data is retrieved from the database. |
AFTERDATA | If this memo field isn't empty, Stonefield Query assumes it contains code and executes that code after data is retrieved from the database. |
CREATEDAT | The date and time the report was created. |
CREATEDBY | The user who created the report. |
MODIFIEDAT | The date and time the report was last modified. |
MODIFIEDBY | The user who last modified the report. |
RUNAT | The date and time the report was last run. |
RUNBY | The user who last ran the report. |
TEMPLATE | The ID of the template for this report. |
OLDENGINE | This contains True if the old report engine is used to run this report. |
ALLOWDUPE | This contains True to allow possible duplicate values in the report. |
SNAPSHOT | This contains an image: a snapshot of the first page the last time the report was run. |
SQLCLAUSE | Additional clauses to add to the SQL statement for the report. |
EXCLUDE | This memo field contains XML specifying the exclude conditions for the report using the same format as described above for FILTER. |
HEADTOTALS | True if group totals should appear in group header bands or False to appear in group footer bands. |
DISTINCT | True to add DISTINCT to the SQL statement for the report. |
CUSTOMJOIN | This memo field contains XML specifying the custom joins for the report.
<joins> <join> <table1>ORDERS</table1> <table2>CUSTOMERS</table2> <jointype>right outer join</jointype> </join> </joins> |
AUTOFIT | True to auto-fit the report to the page. |
WARNNOFILT | True to display a warning if the report has no filter when it's run. |
RECPERGRP | The number of records to retrieve per group (0 means retrieve all records). |
AFTERPREV | The After Preview script for the report. |
BEFOREOUT | The Before Output script for the report. |
USEOTHERS | True to use "Other" for non-top records or False to omit non-top records. |
Folder Records
Field | Purpose |
---|---|
RECTYPE | "F" |
NAME | The name of the folder. |
FOLDERS | The ID values of the parent folder of this folder. |
CREATEDAT | The date and time the folder was created. |
CREATEDBY | The user who created the folder. |
Template Records
Field | Purpose |
---|---|
RECTYPE | "T" |
NAME | The name of the template. |
COMMENTS | Comments about the template. |
FRXFILE | Contains XML for the template layout. |
CREATEDAT | The date and time the template was created. |
CREATEDBY | The user who created the template. |
MODIFIEDAT | The date and time the template was last modified. |
MODIFIEDBY | The user who last modified the template. |
© Stonefield Software Inc., 2023 • Updated: 01/03/19
Comment or report problem with topic