Crystal Reports未出现在生产服务器,Windows上 [英] Crystal Reports are Not Appearing on production server, windows

查看:64
本文介绍了Crystal Reports未出现在生产服务器,Windows上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在使用c#在asp.net上使用Crystal Reports。



在测试n调试模式时,它运行良好。



但是在我发布我的web应用程序之后,在生产服务器上运行它。它没有查看我的报告。



我的c#代码:

Hi guys,

I was working on Crystal Reports in asp.net using c#.

In testing n debugging mode, it was running good.

but after i published my web application n run it on production server. Its not viewing my reports.

my c# code:

protected void GetReport()
       {
           try
           {
               String ReportPath = "";

               ReportDocument cryRpt = new ReportDocument();

               TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();

               TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();

               ConnectionInfo crConnectionInfo = new ConnectionInfo();

               Tables CrTables;

               ReportPath = Server.MapPath("\\dept.rpt");
               lblrpt.Text = ReportPath;
               cryRpt.Load(ReportPath);


               crConnectionInfo.ServerName = "ITACS";

               crConnectionInfo.DatabaseName = "ITAccessories";

               crConnectionInfo.UserID = "sa";

               crConnectionInfo.Password = "123456";



               CrTables = cryRpt.Database.Tables;



               foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
               {

                   crtableLogoninfo = CrTable.LogOnInfo;

                   crtableLogoninfo.ConnectionInfo = crConnectionInfo;

                   CrTable.ApplyLogOnInfo(crtableLogoninfo);

               }



               CrystalReportViewer1.ReportSource = cryRpt;
               CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
               //cryRpt.PrintToPrinter(1, false, 0, 0);
           }
           catch (Exception ee)
           {

           }
       }





Plzzz ......伙计们,帮助我。



我的经理在我的头上完成这个。



谢谢



Plzzz... guys, help me.

My manager is on my head to complete this.

Thanks

推荐答案

其实一切都正确无误,



但问题是,我正在使用bootstrap,这个引导程序正在停止查看水晶报告,



所以,我在新窗口中打开了该报告。 &它运作良好。



谢谢大家。
Actually everything is correct & proper,

But the thing is, I was using bootstrap, n this bootstrap was stopping the crystal report to view,

So, I opened that report in new window. & its working well.

Thanks everyone.


这篇关于Crystal Reports未出现在生产服务器,Windows上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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