当前位置: 首页 > 网络学院 > 客户端脚本教程 > APPML > break

APPML
AppML 简介
AppML 案例
AppML 案例说明
AppML 网络服务
案例研究简介
案例研究:数据库
案例研究:AppML
案例研究:HTML 报告
案例研究:HTML 表单
案例研究:目录
案例研究:产品
案例研究:托运人
案例研究:供应商
案例研究:客户
案例研究:雇员
案例研究:应用程序
案例研究:下载
AppML FAQ
AppML 文档
AppML 数据库元素

APPML 中的 break


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 266 ::
收藏到网摘: n/a

The <break> element is used to define breaks in the report. This element is used together with the <section> element.
<break> 元素用于在报告中定义换行符。该元素用于和<section>元素一起使用。

The <break> and <section> elements are used to create reports divided into sections, e.g. Sales per year, Sales per category, Customers by country, Sales per customer, etc.
<break>元素和<section>元素混合使用可以将报告拆分成片断。举个例子来说,每年的销售、每类的销售、每个国家的客户、每个客户的销售量,等等。

Note: The HTML report must be ordered by the field it should break on.
注意:HTML 报告必须按照字段(这些字段必须被隔开)来排列。


<break> Child Elements
<break>子元素

The <break> element may have the following child elements:
<break>元素可以包含下面这些子元素:

Element
元素
Description
描述
field Specifies the field the report should break on
指定需要断开的字段报告
section Specifies the name of the section the report should jump to after the break
指定需要跳过换行符的报告片断名称


Example
案例

<?xml version="1.0" ?>
<appml>
<title>CUSTOMERS BY COUNTRY</title>
<database>
<connection>northwind</connection>
</database>

<filters>
<orderby>country,companyname,city</orderby>
</filters>

<htmlreport>
<sql>
SELECT companyname,contactname,city,country,phone
FROM Customers
</sql>
<break>
<field>country</field>
<section>C</section>
</break>
<header>
<h3>CUSTOMERS BY COUNTRY</h3>
</header>

<section name="A">
<html><![CDATA[
<p><b>COUNTRY:</b> #appml:field(name='country')</p>
<table width="90%" border="1" cellpadding="1" cellspacing="1">
<tr>
<th width="30%">Company</th>
<th width="30%">Contactperson</th>
<th width="20%">City</th>
<th width="20%">Phone</th>
</tr>
]]>
</html>
</section>

<section name="B" repeat="10000" movenext="yes">
<html><![CDATA[
<tr>
<td>#appml:field(name='companyname')</td>
<td>#appml:field(name='contactname')</td>
<td>#appml:field(name='city')</td>
<td>#appml:field(name='phone')</td>
</tr>
]]>
</html>
</section>

<section name="C">
<html><![CDATA[</table><br />]]></html>
</section>
</htmlreport>
</appml>

View the output produced by the AppML HTML List Service
查看由AppML HTML 报告服务输出的结果

View the XML source file
查看XML 源文件

评论 (0) All

登陆 | 还没注册?