当前位置: 首页 > 网络学院 > 客户端脚本教程 > APPML > AppML 过滤函数

APPML
AppML HTML 报告
AppML 过滤函数
AppML HTML 列表
AppML HTML 表单
AppML XML 报告

APPML 中的 AppML 过滤函数


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

The <filters> element contains the fields the user can query and sort by at runtime.
<filters>元素嵌套了用户可以查询和排列的字段名。


The <filters> Element
<filters>元素

The <filters> element provides a way to define queries and sort orders that can be changed by the user at run time.
<filters>元素提供了用于定义查询和排列顺序的方式,用户可以改变它。

The AppML description below defines a Filter function for the HTML report. The AppML Report Service will here sort the report by companyname, and generate a Filter link on top of the report. A search box will be displayed when clicking on the Filter link. The user will be able to search for the fields specified in the AppML description (companyname and country). The user may also select what fields to order the report on, and to specify the sort-order (ASC or DESC). The AppML Report Service also has a built-in function that gives the user the opportunity to open the report in MS Excel, MS Word or to be displayed as XML.
下面的AppML描述为HTML报告定义了一个过滤函数。AppML报告服务将通过公司名称对报告进行分类,并在报告顶端产生一个过滤连接。当点击过滤连接时,将显示搜索框。用户可以通过在AppML描述(公司名称和国家)中指定的字段进行搜索。用户也可以选择报告排列的顺序,并指定排列顺序(升序 或 降序)。AppML报告服务也包含了一个内置的函数,它将使用户可以在MS Excel、MS Word打开报告,或者以XML形式来显示。

Note: The <sql> MUST contain all the data fields the user may query! ????? Nei ?????
注意:<sql>必须嵌套所有能为用户提供搜索的数据字段(????? Nei ?????):

<?xml version="1.0" ?>
<appml>
<title>CUSTOMERS</title>
<database>
<connection>northwind</connection>
<sql>SELECT Companyname,ContactName,Country
FROM Customers</sql>
</database>
<filters>
<orderby>Companyname</orderby>
<query><field>Companyname</field></query>
<query><field>Country</field></query>
<orderselect>
<field>Companyname</field>
<field>Country</field>
</orderselect>
</filters>
<htmlreport />
</appml>

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

View the XML source file
查看XML 源文件

To create more advanced filters, look at the examples in the sub elements below.
创建更多高级的过滤函数,见下面属性列表和二级元素列表中的案例。


<filters> Attributes
<filters>属性

The <filters> element may have the following attributes:
<filters>元素可以包含下面这些属性:

Attribute
属性
Value
Description
描述
preview false Disables the preview of records before filtering (for large recordsets?)
在使用过滤函数之前不允许预先打开记录(对于长记录集而言)


<filters> Child Elements
<filters>子元素

The <filters> element may have the following child elements:
<filters>元素可以包含下列子元素:

Element
元素
Description
描述
orderby Defines a fixed ORDER BY clause to be added to the SQL every time the application runs
每当应用程序运行时,定义了一个固定的ORDER BY子句,并将其添加到SQL中
orderselect Defines which fields the user can sort by at runtime
定义了用户在分类排列时选取的字段
query Defines which fields the user can query at runtime
定义了用户在查询时选取的字段
where Defines a fixed WHERE clause to be added to the SQL every time the application runs
每当应用程序运行时,定义了一个固定的WHERE子句,并将其添加到SQL中


评论 (0) All

登陆 | 还没注册?