翻譯|使用教程|編輯:王香|2018-09-30 10:25:43.000|閱讀 376 次
概述:在Stimulsoft如何使用組件屬性自定義Flash查看器,可以更改查看器元素的顏色,隱藏隱藏不必要的按鈕或菜單項,設置控件的默認狀態(tài),更改Flash查看器的某些行為。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
【下載Stimulsoft Reports.Net最新版本】
此示例項目演示了如何使用組件屬性自定義Flash查看器。您可以更改查看器元素的顏色,隱藏隱藏不必要的按鈕或菜單項,設置控件的默認狀態(tài),更改Flash查看器的某些行為。 例如,設置flash查看器控件的默認寬度和heihgt,顯示和隱藏工具欄上的一些按鈕,設置單擊“退出”按鈕時將使用的URL地址,隱藏一些報表導出,設置其他文本。關于對話框:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Customize_the_ViewerFx.Default" %> <%@ Register assembly="Stimulsoft.Report.Web" namespace="Stimulsoft.Report.Web" tagprefix="cc1" %> <!DOCTYPE html> <html xmlns="//www.w3.org/1999/xhtml"> <head runat="server"> <title>Customize the ViewerFx</title> </head> <body> <form id="form1" runat="server"> <cc1:StiWebViewerFx ID="StiWebViewerFx1" runat="server" Width="1000px" Height="700px" ShowOpenButton="false" ShowDesignButton="false" ShowExitButton="true" ExitUrl="//www.stimulsoft.com" ShowExportToBmp="false" ShowExportToPcx="false" ShowExportToSvg="false" ShowExportToSvgz="false" ShowExportToPng="false" ShowExportToGif="false" ShowExportToSylk="false" ShowExportToMetafile="false" ShowExportToJpeg="false" ShowExportToTiff="false" ShowExportToDif="false" ShowExportToDbf="false" ShowExportToCsv="false" ShowExportToXml="false" AboutDialogTextLine1="My Company Name" AboutDialogTextLine2="Information about My Company" OnGetReport="StiWebViewerFx1_GetReport" /> </form> </body> </html>
要顯示報表,您應添加OnGetReport事件,您需要在該事件中加載報表模板文件,并在需要時注冊數(shù)據(jù)。
protected void Page_Load(object sender, EventArgs e) { } protected void StiWebViewerFx1_GetReport(object sender, Stimulsoft.Report.Web.StiReportDataEventArgs e) { string reportPath = Server.MapPath("Reports/SimpleList.mrt"); StiReport report = new StiReport(); report.Load(reportPath); string dataPath = Server.MapPath("Data/Demo.xml"); DataSet data = new DataSet(); data.ReadXml(dataPath); report.RegData(data); e.Report = report; }
示例代碼的結(jié)果如下圖所示:
購買Stimulsoft正版授權,請點擊“”喲!
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務必注明出處、不得修改原文相關鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn