您的位置:首页 > 知识库 > 设计基础 > Tag-导出功能

Tag-导出功能

属性说明

关于Tag中关于导出相关的功能目前有三个导出Excel,导出PDF,打印。

相关的属性述如下:

属性名称

是否必填

属性含义

属性取值

缺省值

分类

NeedSaveAsExcel

需要显示将报表存为Excel的功能钮

yes或no

no

导出

NeedSaveAsPdf

需要显示将报表存为PDF的功能

yes或no

no

导出

NeedPrint

需要显示打印报表的功能钮

yes或no

no

导出

ExcelLabel

导出ExcelButton外观定义

html元素或文字。

存为Excel

导出

PdfLabel

导出PdfButton外观定义

html元素或文字。

存为PDF

导出

PrintLabel

打印Button外观定义

html元素或文字。

打印

导出

 

用法示例

1 初始化设置

标签如下:

<%@ Register Assembly=”report35net” Namespace=”com.runqian.report.tag” TagPrefix=”report” %>

<head runat=”server”>

<title>演示报表</title>

</head>

<body topmargin=0 leftmargin=0 rightmargin=0 bottomMargin=0>

<report:HtmlTag

runat=”server”

ID=”showReport_ID”

Name=”report1″

ReportFileName=”hello.raq”

/>

</body>

</html>

展示效果如下:

tag_init.png

 

2 增加导出功能NeedSaveAsExcel、NeedSaveAsPdf、NeedPrint

Aspx如下:

<%@ Register Assembly=”report35net” Namespace=”com.runqian.report.tag” TagPrefix=”report” %>

 

<head runat=”server”>

<title>演示报表</title>

</head>

<body topmargin=0 leftmargin=0 rightmargin=0 bottomMargin=0>

<report:HtmlTag

runat=”server”

ID=”showReport_ID”

Name=”report1″

ReportFileName=”hello.raq”

 

NeedSaveAsExcel=”yes”

NeedSaveAsPdf=”yes”

NeedPrint=”yes”

/>

</body>

</html>

展示效果如下:

tag_needasfunction.png

 

3设置导出功能的Button的显示值(文本)

Aspx如下

<%@ Register Assembly=”report35net” Namespace=”com.runqian.report.tag” TagPrefix=”report” %>

 

<head runat=”server”>

<title>演示报表</title>

</head>

<body topmargin=0 leftmargin=0 rightmargin=0 bottomMargin=0>

<report:HtmlTag

runat=”server”

ID=”showReport_ID”

Name=”report1″

ReportFileName=”hello.raq”

 

NeedSaveAsExcel=”yes”

NeedSaveAsPdf=”yes”

NeedPrint=”yes”

 

ExcelLabel=”导出Excel的标签”

PdfLabel=”导出PDF的标签”

PrintLabel=”打印的标签”

/>

</body>

</html>

展示效果如下:

tag_functionLabel.png

 

 

4设置导出功能的Button的显示值(Html)

Aspx如下:

<%@ Register Assembly=”report35net” Namespace=”com.runqian.report.tag” TagPrefix=”report” %>

 

<head runat=”server”>

<title>演示报表</title>

</head>

<body topmargin=0 leftmargin=0 rightmargin=0 bottomMargin=0>

 

<report:HtmlTag

runat=”server”

ID=”showReport_ID”

Name=”report1″

ReportFileName=”hello.raq”

 

NeedSaveAsExcel=”yes”

NeedSaveAsPdf=”yes”

NeedPrint=”yes”

 

ExcelLabel=”<img src=’reportBase/reportAspx/img/excel.gif’ border=no >”

PdfLabel=”<img src=’reportBase/reportAspx/img/pdf.gif’ border=no >”

PrintLabel=”<img src=’reportBase/reportAspx/img/print.gif’ border=no >”

/>

 

</body>

</html>

展示效果如下:

tag_functionLabeltoImage.png

浏览次数:0 ; 发布日期:2009/09/14

热门文章

  • 申请试用授权 - 24,697 views
  • 使用入门教程简介 - 15,434 views
  • .NET报表产品概况 - 15,033 views
  • 联系我们 - 7,500 views
  • 技术支持 - 5,224 views
  • 高效报表设计 - 4,607 views
  • Web报表工具的新起点 - 4,136 views
  • 复杂报表的制作 - 3,899 views
  • Web报表软件的采购成本 - 3,539 views
  • 下载试用 - 3,373 views