📄 jreport.zul
字号:
<?xml version="1.0" encoding="UTF-8"?><!--jreport.zul{{IS_NOTE Purpose: Description: History: Thu Nov 13 16:07:16 TST 2008, Created by Flyworld}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><window id="demo" apply="org.zkoss.zkdemo.userguide.DemoWindowComposer"> <html><![CDATA[ <h4>JasperReports</h4> <p>Show the report on the browser.</p> <p>Some browser will pop-up the save window, some will embedded PDF in browser.</p> <p>You can choose the format of the report.</p> ]]></html> <separator />
<tabbox width="100%" tabscroll="false">
<tabs>
<tab id="demoView" label="Demo"/>
<tab id="srcView" label="View Source"/>
</tabs>
<tabpanels>
<tabpanel>
<window id="view">
</window>
</tabpanel>
<tabpanel>
<panel>
<panelchildren>
<textbox id="codeView" class="code" rows="20" width="95%">
<attribute name="value"><![CDATA[<zk> Choice the file type : <listbox id="format" mold="select" onSelect="showReport()" > <listitem label="PDF" value="pdf" selected="true" /> <listitem label="XML" value="xml" /> <listitem label="HTML" value="html" /> <listitem label="Word (RTF)" value="rtf" /> <listitem label="Excel" value="xls" /> <listitem label="Excel (JXL)" value="jxl" /> <listitem label="CSV" value="csv" /> <listitem label="OpenOffice (ODT)" value="odt" unless="false"/> </listbox> <button label="Report!" onClick='showReport()'/> <jasperreport id="report" height="360px" /> <zscript> import org.zkoss.zkdemo.userguide.CustomDataSource; void showReport() { //Preparing parameters Map parameters = new HashMap(); parameters.put("ReportTitle", "Address Report"); parameters.put("DataFile", "CustomDataSource from java"); report.setSrc("/userguide/data/jasperreport.jasper"); report.setParameters(parameters); report.setDatasource(new CustomDataSource()); report.setType((String) format.getSelectedItem().getValue()); } </zscript></zk>
]]></attribute>
</textbox>
</panelchildren>
<toolbar mold="panel">
<button id="tryBtn" label="Try me!"/>
<button id="reloadBtn" label="Reload" height="18px"/>
</toolbar>
</panel>
</tabpanel>
</tabpanels>
</tabbox></window>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -