简体   繁体   English

Crystal Reports(VS 2010)报告未显示且未引发任何错误

[英]Crystal Reports (VS 2010) report not showing up and not throwing any errors

I'm trying to get a Crystal Report to show up on a web page. 我正在尝试使Crystal Report显示在网页上。 My code looks like this: 我的代码如下所示:

            ReportDocument rd = new ReportDocument();
            rd.Load(@"C:\projects\reports\testreport.rpt");
            rd.SetDatabaseLogon("sa", "thepassword");
            CRViewer.ReportSource = rd;

I've worked through several actual errors already to get to where I am now. 我已经解决了几个实际错误,现在可以到达现在的位置。 The last error I had was that the connection couldn't be made, but when I added the SetDabaseLogon call to use SQL Server Auth security instead of integrated that problem was fixed. 我遇到的最后一个错误是无法建立连接,但是当我添加SetDabaseLogon调用以使用SQL Server Auth安全性而不是集成时,此问题已得到解决。

Now I am not getting any error at all but the report simply doesn't show up. 现在我什么都没有收到,但报告根本没有显示。

I'm at a loss as to what to try now, any ideas would be appreciated! 我对现在尝试什么一无所知,任何想法将不胜感激!

(I don't know if this is really relevant or not, but this is in a SharePoint web part that I'm creating.) (我不知道这是否真的相关,但这在我正在创建的SharePoint Web部件中。)

Try adding this line: CRViewer.Show(); 尝试添加以下行:CRViewer.Show();

If it isn't that simple, then I'd run the application outside of the webpart wrapping to at least confirm/deny if it being in SharePoint is related. 如果不是那么简单,那么我将在Webpart包装之外运行该应用程序,以至少确认/拒绝它是否与SharePoint相关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM