【Stimulsoft Reports Flex教程】在同一页面上使用Designer和Viewer

下载Stimulsoft Reports Flex最新版本

<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{    StiDesignerFx.initialize();    ...}
<viewer:StiViewerFx id="viewerFx" left="415" right="20" top="20" bottom="20" />

首先,在onCreateNewReportClick()事件中创建一个新的 表对象并将其分配给查看器:

private function onCreateNewReportClick(): void{    buttonDesignReport.enabled = true;    // Create new report object    report = new StiReport();    // Assign report to Viewer    viewerFx.report = report;}

接下来在onDesignReportClick()事件中使用此 表调用 告设计器对话框:

private function onDesignReportClick(): void{    buttonViewDesignedReport.enabled = true;    // Design report in Designer dialog window    report.designDialog();}

最后,在onViewDesignedReportClick()事件中,将此 表标记为未呈现,并再次将其分配给 表查看器:

private function onViewDesignedReportClick(): void{    // Mark report as not rendered    report.isRendered = false;    // Reassign designed report to Viewer    viewerFx.report = report;}

下面的屏幕截图中,您可以看到示例代码的结果。

Stimulsoft

下载示例

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

Codemix活动
标签: 表 表控件Stimulsoft

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

上一篇 2019年1月4日
下一篇 2019年1月4日

相关推荐

发表回复

登录后才能评论