当前位置: 首页 > 网络学院 > 客户端脚本教程 > APPML > 案例研究:HTML 报告

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

APPML 中的 案例研究:HTML 报告


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

The AppML HTML Report Service
AppML HTML 报告服务

AppML uses standard SQL to control the selection of data, and a query element to define data fields that can be queried at runtime.
AppML使用标准的SQL来控制数据选择,使用查询元素来定义在运行时间内用于被查询的数据字段。

<appml>
<database>
<connection>northwind</connection>
<sql>
SELECT CompanyName,ContactName,City FROM Customers
</sql>
</database>
<filters>
<query>
<field>CompanyName</field>
</query>
</filters>
<htmlreport/>
</appml>

Click here to see the output produced by the HTML Report Service.
点击这里查看通过HTML报告服务产生的结果。

When you run the example, use the FILTER link at the top of the report to filter the report!
当你运行这个案例时,使用位于报告顶部的FILTER链接来过滤报告。


A Report With Query And Order-By Filters
查询和订单报告

This AppML description has added information about ordering, querying, and filtering the data:
AppML描述已经添加了关于订单、查询和过滤数据的信息:

<appml>

<database>
<connection>northwind</connection>
<sql>
SELECT CompanyName,ContactName,City FROM Customers
</sql>
</database>
<filters>
<orderby>CompanyName</orderby>
<query>
<field>CompanyName</field>
<value>a</value>
</query>
<query>
<field>City</field>
<sql>SELECT DISTINCT city FROM customers ORDER BY city</sql>
</query>

<orderselect>
<field>CompanyName</field>
<field>ContactName</field>
<field>City</field>
</orderselect>
</filters>
<htmlreport/>

</appml>

Click here to see the output produced by the HTML Report Service.
点击这里查看通过HTML报告服务产生的结果。


Adding A Corporate Layout
添加一个共同布局

AppML is also perfect for producing HTML reports with a corporate layout.
AppML对于使用共同布局来产生HTML报告也是非常完美的。

By adding a <stylesheet> tag with the name of your own CSS file you can easily change the layout of a report.
通过添加在央视表文件中指定名称的<stylesheet>标签,你可以很轻松地改变报告的布局。

By modifying the standard stylesheet ("appml_stylesheet.css"), you can easily change the layout of ALL your reports.
通过修改标准的样式表文件("appml_stylesheet.css"),你可以很轻松的改变所有报告的布局。

<appml>

<database>
<connection>northwind</connection>
<sql>
SELECT CompanyName,ContactName,City FROM Customers
</sql>
</database>
<htmlreport>
<stylesheet>corp_stylesheet.css</stylesheet>
<header>
<h4><img src="images/factory.jpg" /> NORTHWIND
CUSTOMERS pr. #appml:date(format='dd.mm.yyyy')</h4>
</header>
</htmlreport>

</appml>

Click here to see the output produced by the HTML Report Service.
点击这里查看通过HTML报告服务产生的结果。


A Report With Sections
报告片断

With AppML it is easy to create reports divided into sections, e.g. Sales per year, Sales per category, Customers by country, Sales per customer, etc.
通过AppML,你可以很轻松的创建报告片断。举个例子来说,报告每年的销售记录、客户国籍、每户消费量等等。

The AppML <section> element divides the output into sections. Any legal HTML elements can be put inside this element. The AppML <break> element is used to define breaks in the report.
AppML<section>元素将产生的结果分成了若干片断。任何一个合法的HTML元素可以被放进该元素内。AppML<break>元素是用于定义报告中的换行符的。

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

View the AppML source file
查看AppML源文件


Save A Lot Of Development Time
节约大量的开发时间

Note: ALL the examples above use the same AppML service to produce the HTML report! This saves you a lot of development time!
注意:上述所有的案例都使用了同样的AppML服务来输出HTML报告!这将节省大量的开发时间!


评论 (0) All

登陆 | 还没注册?