zhuyinyin_66 发表于 2015-3-11 17:06:00

flashviewer,显示不出报表内容

zhuyinyin_66 发表于 2015-3-11 17:08:00

报表模式,设为flashviewer,显示不出内容,附件DEMO已上传

frank.zhang 发表于 2015-3-11 17:47:00

您好,
需要在Page_Load中增加以下代码。运行效果详见图1。代码是基于AR最新的版本9.1的。
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      Dim _reportDef As New GrapeCity.ActiveReports.PageReport(New System.IO.FileInfo(Server.MapPath("") + "\RdlReport1.rdlx"))
      Dim _reportRuntime As New GrapeCity.ActiveReports.Document.PageDocument(_reportDef)
      WebViewer1.Report = _reportDef
      WebViewer1.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.FlashViewer
    End Sub




zhuyinyin_66 发表于 2015-3-12 09:21:00

回复 3楼frank.zhang的帖子

有基于C#的例子吗,我的程序是Activereports9的吧,用9.1的代码,有什么区别吗

zhuyinyin_66 发表于 2015-3-12 09:27:00

其实,我在代码里有写类似
                  string zhi = CheckBoxList1.SelectedValue.ToString();
                  //WebViewer1.ReportName = "file: xd\\02\\nong_erfen.rdlx";

                  string b = DropDownList1.SelectedValue.ToString();
                  string rname = zhi+".rdlx";
                  GrapeCity.ActiveReports.PageReport report1 = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath(rname)));
                  report1.Report.ReportParameters.DefaultValue.Values.Add(b);
                  WebViewer1.Report = report1;

frank.zhang 发表于 2015-3-12 09:32:00

您好,
基于C#的例子,我们有一系列详细的文章。分入门,基础和应用三部分教程。
http://www.gcpowertools.com.cn/products/activereports_resources.htm#rimarytutorials
建议您参考http://blog.gcpowertools.com.cn/post/2014/09/23/ActiveReports_GettingStart2aspx.aspx。
如果需要使用flashviewer,需要设置
WebViewer1.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.FlashViewer;
并将C:\Program Files (x86)\ComponentOne\ActiveReports 9\Deployment\Flash下的两个DLL放入工程。

zhuyinyin_66 发表于 2015-3-12 09:36:00

<handlers>
                        <add verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" name="AsmxHandler" resourceType="Unspecified" preCondition="integratedMode"/>
                        <add verb="*" path="*.ar9" type="GrapeCity.ActiveReports.Web.Handlers.ReportBinariesStreamer, GrapeCity.ActiveReports.Web.v9, Version=9.0.1678.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR9_ReportBinariesStreamer" resourceType="Unspecified" preCondition="integratedMode"/>
                        <add verb="*" path="*.ActiveReport" type="GrapeCity.ActiveReports.Web.Handlers.CompiledReportHandler, GrapeCity.ActiveReports.Web.v9, Version=9.0.1678.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR9_CompiledReportHandler" resourceType="Unspecified" preCondition="integratedMode"/>
                        <add verb="*" path="*.rpx" type="GrapeCity.ActiveReports.Web.Handlers.RpxHandler, GrapeCity.ActiveReports.Web.v9, Version=9.0.1678.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR9_RpxHandler" resourceType="Unspecified" preCondition="integratedMode"/>
                        <add verb="*" path="*.rdl,*.rdlx" type="GrapeCity.ActiveReports.Web.Handlers.RdlxHandler, GrapeCity.ActiveReports.Web.v9, Version=9.0.1678.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR9_RdlxHandler" resourceType="Unspecified" preCondition="integratedMode"/>
                        <add verb="*" path="*.ar9Web" type="GrapeCity.ActiveReports.Web.Handlers.WebCacheAccessHandler, GrapeCity.ActiveReports.Web.v9, Version=9.0.1678.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR9_WebCacheAccessHandler" resourceType="Unspecified" preCondition="integratedMode"/>
                        <add name="WijmoControlsHttpHandler" verb="*" preCondition="integratedMode" path="WijmoControlsResource.axd" type="C1.Web.Wijmo.Controls.WijmoHttpHandler, C1.Web.Wijmo.Controls.4, Version=4.0.20143.194, Culture=neutral, PublicKeyToken=9b75583953471eea"/>
                </handlers>

frank.zhang 发表于 2015-3-12 09:50:00

您好,
这个是由于AR9的版本,比您使用的低造成的。我重新做了一个例子。

zhuyinyin_66 发表于 2015-3-12 10:27:00

WebViewer1.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.FlashViewer;
我把这行添加代码里时
报“”

        <ActiveReports9>
                <WebService reportsFolder="~/" assemblyFolder="~/"/>
        </ActiveReports9>

zhuyinyin_66 发表于 2015-3-12 10:28:00

回复 8楼frank.zhang的帖子

因为我的版本是9.0,您的这个例子,我打不开
页: [1] 2
查看完整版本: flashviewer,显示不出报表内容