翻譯|使用教程|編輯:王香|2018-11-01 10:55:01.000|閱讀 319 次
概述:此示例項(xiàng)目演示了如何在ASPX頁面上添加Flash設(shè)計(jì)器并編輯報(bào)表模板。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
要添加Flash設(shè)計(jì)器,只需從Stimulsoft.Report.WebDesign 庫添加StiWebDesignerFx組件即可。
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Using_the_DesignerFx.Default" %> <%@ Register assembly="Stimulsoft.Report.WebDesign" namespace="Stimulsoft.Report.Web" tagprefix="cc1" %> <!DOCTYPE html> <html xmlns="//www.w3.org/1999/xhtml"> <head runat="server"> <title>Using the DesignerFx</title> </head> <body> <form id="form1" runat="server"> <div> <cc1:StiWebDesignerFx ID="StiWebDesignerFx1" runat="server" /> </div> </form> </body> </html>
要打開報(bào)表模板以進(jìn)行編輯,可以使用Page_Load事件。例如,創(chuàng)建新的報(bào)表對象,從文件加載SimpleList.mrt報(bào)表模板,從XML文件添加報(bào)表數(shù)據(jù),并使用Design()方法調(diào)用Flash報(bào)表設(shè)計(jì)器。
protected void Page_Load(object sender, EventArgs e) { string appDirectory = HttpContext.Current.Server.MapPath(string.Empty); // Load report StiReport report = new StiReport(); report.Load(appDirectory + "\\Reports\\SimpleList.mrt"); // Assign data StiXmlDatabase database = new StiXmlDatabase("Demo", appDirectory + "\\Data\\Demo.xsd", appDirectory + "\\Data\\Demo.xml"); report.Dictionary.Databases.Add(database); report.Dictionary.Synchronize(); // Design report StiWebDesignerFx1.Design(report); }
示例代碼的結(jié)果如下圖所示:
購買Stimulsoft正版授權(quán),請點(diǎn)擊“”喲!
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn