Reporting Services(本地模式)不起作用 [英] Reporting Services (local mode) not working

查看:130
本文介绍了Reporting Services(本地模式)不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经制作了一个使用视图的rdl报告,并且可以在远程模式下成功调用该报告.当我将报表查看器设置为本地模式并附加我自己的数据集(由同一视图制成)时,报表查看器控件什么也不显示(只有空白)

有什么建议? (这是SQL 2008和Visual Studio 2008)

这是可以使用的远程模式...

I have made an rdl report which uses a view and I can call that report successfully in remote mode. When I set the report viewer to local mode and attach my own dataset (made from the same view) the report viewer control shows nothing (there is just white space)

Any suggestions? (this is SQL 2008 and Visual Studio 2008)

This is the remote mode which works...

rv.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
 rv.ServerReport.ReportServerUrl = new System.Uri("http://myserver/ReportServer");
 rv.ServerReport.ReportPath = "/Test1/JobTest2";
 rv.ServerReport.Refresh();


这是什么都不显示的本地模式...


This is the local mode which shows nothing...

rv.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
 rv.ServerReport.ReportServerUrl = new System.Uri("http://myserver/ReportServer");
 rv.ServerReport.ReportPath = "/Test1/JobTest2";
 ReportDataSource rds = new ReportDataSource();
 rds.Name = "rpv_Job";
 rds.Value = dstGetJobData().Tables[0];
 rv.LocalReport.DataSources.Clear();
 rv.LocalReport.DataSources.Add(rds);
 rv.DataBind();
 rv.LocalReport.Refresh();

推荐答案


我只使用以下几行代码:

Hi,
I''m using just the following lines of code:

rptView.LocalReport.DataSources.Clear();
            rptView.LocalReport.DataSources.Add(ds);
            rptView.LocalReport.Refresh();



这是从页面设计中得到的



and this is from the page design

<rsweb:ReportViewer ID="rptView" runat="server" Width="9.25in" Visible="False">
        <localreport reportpath="Reports\User_Monthly_Report.rdlc">
        </localreport>
    </rsweb:ReportViewer>




也许您也应该设置本地报表的路径,并检查数据源名称是否为corect(如报表定义中的名称一样).




Maybe you should set the path to local report also, and also check if the datasource name is corect (like the one in report definition).


这篇关于Reporting Services(本地模式)不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆