翻譯|使用教程|編輯:楊鵬連|2021-02-09 09:51:32.373|閱讀 216 次
概述:本文介紹了報表生成器Stimulsoft Reports.Net常問問題解讀。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Stimulsoft Reports.Net是一個基于.NET框架的報表生成器,能夠幫助你創(chuàng)建結(jié)構(gòu)、功能豐富的報表。StimulReport.Net 的報表設(shè)計器不僅界面友好,而且使用便捷,能夠讓你輕松創(chuàng)建所有報表;該報表設(shè)計器在報表設(shè)計過程中以及報表運行的過程中都可以使用。在運行時使用StimulReport.Net 的報表設(shè)計器不需要支付任何的專利費用。
所創(chuàng)建的報表既可以在Windows窗體應(yīng)用程序中使用,也可以在Asp.Net應(yīng)用程序中使用。可導(dǎo)出多種數(shù)據(jù)格式,比如:PDF,XML,HTML,Word,Excel,RTF格式,文本文件,CSV,BMP和JPEG格式,GIF,PNG,TIFF格式等。
立即點擊下載Stimulsoft Reports.Net v2020.5.1最新版
1.如何保存/加載報告?
要保存報告:
StiReport report = new StiReport(); report.Save("report.mrt");加載報告:
StiReport report = new StiReport(); report.Load("report.mrt");2.如何加載DataSet XSD模式?
要加載DataSet XSD模式,可以使用ImportXMLSchema方法:
StiReport report = new StiReport(); DataSet dataSet = new DataSet("Test"); dataSet.ReadXmlSchema("dataset.xsd"); report.Dictionary.ImportXMLSchema(dataSet);3.如何呈現(xiàn)報告?
渲染報告并在預(yù)覽窗口中顯示渲染的報告:
StiReport report = new StiReport(); report.Load("report.mrt"); report.Show();4.如何訪問變量?
要訪問變量,可以使用以下代碼:
StiReport report = new StiReport(); report.Load("Variables.mrt"); report.Compile(); // Set Variable report["VariableName"] = "Value"; // Get Variable object value = report["VariableName"];5.如何將數(shù)據(jù)附加到報表?
有必要在數(shù)據(jù)存儲中注冊數(shù)據(jù)以將其附加到報表。您可以這樣進行:
DataSet dataSet1 = new DataSet(); dataSet1.ReadXmlSchema("Demo.xsd"); dataSet1.ReadXml("Demo.xml"); StiReport report = new StiReport(); report.RegData(dataSet1);6.如何運行報表設(shè)計器?
像這樣做:
StiReport report = new StiReport(); report.Design();7.如何保存/加載渲染報告?
要保存呈現(xiàn)的報告:
// Rendering report StiReport report = new StiReport(); report.Load("report.mrt"); report.Render(); // Saving report report.SaveDocument("document.mdc");加載先前保存的渲染報告:
StiReport report = new StiReport(); report.LoadDocument("document.mdc");8.如何在沒有預(yù)覽的情況下立即打印報告?
對于報告的初始負載:
StiReport report = new StiReport(); report.LoadDocument("document.mdc");現(xiàn)在打印報告:
report.Print();
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自: