当前位置: 首页 > 网络学院 > 客户端脚本教程 > APPML > section
The <section> element is used to divide the report output into sections. Any legal HTML elements can be put inside this element.
<section>元素用于将报告结果拆分成片断。任何合法的HTML元素都可以被放到这个元素中。
Tip: The <section> element may be used in conjunction with the <break> element to create reports divided into sections, e.g. Sales per year, Sales per category, Customers by country, Sales per customer, etc.
提示:<section>元素可以和<break>元素一起使用,把报告拆分成片断,举个例子来说,每年的销售、每类的销售、每个国家的客户、每个客户的销售量,等等。
The <section> element may have the following attributes:
<section>元素可以包含下面这些属性:
Attribute 属性 | Value 值 | Description 描述 |
---|---|---|
movenext | yes | Moves to the next record in the recordset after each repeat 移动到记录集中的下一个记录,并重复 |
name | name | Specifies a unique name for the section 为片断指定一个独立的名称 |
repeat | number | Specifies the number of times to repeat the section. If not the movenext attribute is defined the report will display the same record the number of times specified in this attribute 指定片断重复的时间次数。如果没有定义movenext属性,那么报告将会重复显示指定次数相同的记录 |
The <section> element may have the following sub elements:
<section>元素可以包含下面这些二级元素:
Element 元素 | Description 描述 |
---|---|
<html>[CDATA[ ...... ...... ...... ]]> | Inside this element you may put any standard HTML elements and scripts. You may also show data from the database. Data values from the database is inserted with the following syntax: 在这个元素中,你可以放入所有标准的HTML元素和脚本程序.你也可以显示数据库中的数据。数据库中的数据值将按照下面的语法一起插入。 #appml:field(name='fieldname') Why CDATA? When working with sections, you often split the HTML code in an incorrect way. There will often be a start element in one section that will be closed in another section. When the AppML description (the .xml file) is parsed by an XML parser, it will report an error because this is not correct HTML. To avoid that the parser reports an error you must embed your report HTML inside a CDATA section |
<?xml version="1.0" ?> <appml> <break> <header> </htmlreport> |
View the output produced by the AppML HTML List Service
查看由AppML HTML 报告服务输出的结果