此示例显示如何在查看器中显示呈现的 表文档。要从代码创建和显示查看器,您需要调用StiViewerFx.initialize()静态方法。
下载Stimulsoft Reports Flex最新版本
此示例显示如何在查看器中显示呈现的 表文档。要从代码创建和显示查看器,您需要调用StiViewerFx.initialize() 静态方法。在应用程序的initialize事件中调用此方法:
<mx:Application xmlns_mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="1024" minHeight="768" backgroundColor="#e8e8e8" initialize="onInitialize()" xmlns_viewer="stimulsoft.viewer.*">
private function onInitialize(): void{ StiViewerFx.initialize(); ...}
要在查看器中显示 表,您需要加载呈现的 表文件,例如将其分配给documentString变量。接下来,您需要创建StiReport对象并使用loadDocumentFromString()方法从此字符串变量加载呈现的 表。完成这些操作后,您可以使用show()方法在查看器中显示 表:
private function onViewDocumentClick(): void{ // Create new report object var report: StiReport = new StiReport(); // Load document from XML string report.loadDocumentFromString(documentString); // Show report in Viewer report.show();}
您还可以在查看器中将 表显示为对话框窗口。只需更改showDialog()方法中的show()方法,所有其他操作都是相同的:
private function onViewInDialogWindowClick(): void{ // Create new report object var report: StiReport = new StiReport(); // Load document from XML string report.loadDocumentFromString(documentString); // Show report in Viewer dialog window report.showDialog();}
下面的屏幕截图中,您可以看到示例代码的结果。

下载示例
购买Stimulsoft正版授权,请点击“咨询在线客服”哟!

标签: 表 表控件Stimulsoft
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!