- Project tools
- How do I...
|Over 500 more tools...
Opening element in the XML file has no attributes
This element has a id attribute that allows the database driver etc. to be defined
outside the ReportDefinition file in a file that conforms to the TOEXCELParameters
dtd. This element must contain other elements that define a JDBC
connection to a database that has JDBC drivers.
Has a attribute named Type that can = "Paramater" or "Text".
If the Type attribute = "Text" than the value of this element will be the actual
text. If the Type attribute = "Paramater" than the parser will look in the
associated Paramter file for a Paramater with a id = to the value of this
element. For example if the we had
The parser would than look in the Parameter xml file for a element with an id =
"dbuser" and substitute the value from it. For example using the above element
the parser would look for
You could also just define everything in the report defintion file and it would
look like this
Has a type attribute same as DB_USER and contains the path to the JDBC driver you
want to use to connect to the database.If you are using the jdbc-odbc bridge this
could be the path to the java runtime rt.jar or an empty string as the
appropriate class should already be loaded.
Has a Type attribute and contains the password to use to connect to the database.
Currently this is stored in plain text.
This element has a Type attribute (see DB_USER definition above) and contains the url
used to connect to the database. Your JDBC driver should contain documentation
on how this should be formatted.
This element has a Type attribute (see DB_USER definition) and contains the actual
class to use to connect to the specified database with.
<WORKBOOK Name="c:\changeme.xls" Exists="false" ParamFile="params/Supplier.xml">
This element marks the starting of a new workbook. Everything within this
element refresences this workbook. Attribute Name is the actual path to this
workbook. If the name starts with a "?" than the parser will look for a PARAMETER
in the Paramater file for this value. Attribute Exists tells the parser
if it is updating an existing workbook or creating a new one. Valid values
for the Exists attribute are "true" or "false". If the attribute Name points to
an existing file and the attribute exists="false" than the existing workbook is
overwritten. This Element has to have at least one <SHEET>
element defined. The attribute ParamFile tells the parser where to look when it
needs to make substitutions.
<SHEET Name="sheet1" Exists="false" Crop="false">
This defines a worksheet within a workbook. Attribute Name specifies the name
of the worksheet. If the value of the name attribute starts with a "?" than the
parser will look in the defined Paramater file for the name of the sheet.
Attribute Exists tells us if we are updating an existing
SHEET or creating a new one. Valid values for the Exists attribute are true or
false. If the attribute Exists="false" for the WORKBOOK that references this
SHEET than the attribute Exists for this SHEET must be false as well. The
attribute Crop really only applies to existing worksheets. It lets you
eliminate any rows that may have existed before we modified the sheet but we do
not want now. Basically if we have less rows in the new version of our sheet
it lets you decide if you want to keep the rows from the old version of the
sheet that are greater than the last row you defined in the new version.
This Element has to have at least one <ROW> element defined.
<ROW Exists="false" id="-1" Height="-1">
This element represents a row in a worksheet. Attribute Exists tells the parser
whether the ROW exists or not. The Attribute id is the row # in the worksheet.
The attribute id should be a number 0 or greater or -1 if you want this refer
to the next row in the worksheet. Attribute Height lets you set the height of
the row. Valid values for height are positive numbers or -1 if you want to use
the default height. This Element has to have at least one <COLUMN>
<RESULTSET Exists="false" id="-1" Height="-1">
This element represents mutliple rows in a worksheet. The attributes for
RESULTSET are the same and have the same valid values as the attributes for a
ROW element. This element must contain a <SQL> element. This
element must also define at least one <COLUMN> element and you will
probably want to define a <COLUMN> element for each column you
expect the SQL query to return. You can also define other columns that do not
correspond to the columns in the result set. For Instance one
<COLUMN> in the <RESULTSET> may be used to hold a
formula that performs some action on the data taken from the SQL query.
<COLUMN Width="25" Align="0" DataFormat="General" id="0" BgColor="13">
If this element is within a <ROW> element than you can think of it
as an actual cell in the worksheet. If this element is within a
<RESULTSET> than you can think of it as a column of worksheet cells.
Attribute Width sets the width of the cell or column. The actual width of this
column will be the width you set the last reference to this column to. Valid
values for width are numbers greater than 0. The attribute Align lets you set
the alignment within this cell or column. Valid values for Align are 0 through
6 with 0=general, 1=left, 2=center, 3=right, 4=fill, 5=justify, 6=center across
selection. The attribute DataFormat specifies how to format the data within
the cell. Valid values for DataFormat are the strings:
"@" - This is text format.
"text" - Alias for "@"
The attribute id is the number of the column in the worksheet. column "a" would
be an id=0, "b" would be id=1, "c" would be id=2 etc. The attribute BgColor is
the color for the cell. Each column must contain one
This elements is the data in a cell. Attribute Type is the type of data inside
this cell. Valid values for type are Type="Text", Type="Database",
Type="Formula" , Type="Number", or Type="Parameter". If type is equal to "Number"
or "Text" than the value of the element is displayed in the cell. If
Type="Formula" than this cell is set to contain a formula and the formula will
be parsed and the result will be displayed in the cell. The actual calculations
are done by Excel.
If Type="Database" than the value of the element <VALUE> represents
the column in the ResultSet to get the data from. In the above example this
cell would display whatever was in the third column of the resultset. The
first column is = to 1 and the second column would be 2. If Type="Parameter"
than the parser will look in the Parameter File for a <PARAMETER> element with
an id= to the current worksheet. Within the <PARAMETER> element it
will look for a <PARAM> element with an id = to value of this
element. See the two example files earlier in the manual.
<SQL IsPreparedStmt="false" id="rs1">
This element contains a SQL query to execute. The attribute IsPreparedStmt
specifies whether or not this SQL query contains parameters that need to be
replaced by values (represented by ?).Valid values for IsPreparedStmt are "true"
or "false". The attribute id is the id of the <PARAMETER element in
the Parameter file to get the values from.
<FONT Name="Arial" Size="12" Offsettype="0" Weight="8380" Color="8"
Strikeout="no" Underline="0" />
This element is a child of a <COLUMN> element. It is optional, but
if used lets you define a font for the <COLUMN> it is part of.
Attribute Name is the name of the Font to use. It can be any font that Excel
itself can use. The attribute Size specifies the size of the font. The
attribute Offsettype is the Offset type to use. Valid values for Offsettype
are 0,1, or 2. The attribute weight is the weight of the Font. Valid values
for Weight are integers between 100 and 1000. The attribute Color specifies
what color to use for this Font. Valid values are 8 to 64 inclusive. The
Strikeout attribute can = "yes" or "no". The Underline attribute specifies
what type of underline to use for this font. Valid values are 0=no underline,
1=single, 2=double, 21=single accounting, 22=double accounting.