dimanche 11 janvier 2015

Prompts Login window in Crystal Report in ASP.NET


Vote count:

0





  1. I am using VS 2012

  2. MySql


  3. mysql-connector-odbc-5.3.4-win32.msi


    4.crystal report runtime on windows server 2008.




My web application works fine in my development system, but after deployment to Windows server 2008 , crystal reports ask for addition information about login information as given in following screen. enter image description here


using the following code.



string databaseName = "hr";
string serverName = "192.168.137.6";
string userID = "co";
string pass = "password";
protected void btn_search_Click(object sender, EventArgs e)
{
CrystalReportViewer1.Visible = true;

ReportDocument reportDocument = new ReportDocument();
TableLogOnInfo TabLogOnInfo = new TableLogOnInfo();
TableLogOnInfos TabInfos = new TableLogOnInfos();
ConnectionInfo conInfo = new ConnectionInfo();
string reportPath = Server.MapPath(@"~/GeneralEmpReports/ddoWiseEmpRpt.rpt");
string ddoCode = tbx_ddoCode.Text.ToUpper();
reportDocument.Load(reportPath);
reportDocument.SetParameterValue("D", ddoCode);


conInfo.ServerName = serverName;
conInfo.DatabaseName = databaseName;
conInfo.UserID = userID;
conInfo.Password = pass;
conInfo.AllowCustomConnection = false;
conInfo.IntegratedSecurity = false;

foreach (CrystalDecisions.CrystalReports.Engine.Table T in reportDocument.Database.Tables)
{
TabLogOnInfo = T.LogOnInfo;
TabLogOnInfo.ConnectionInfo = conInfo;
T.ApplyLogOnInfo(TabLogOnInfo);
}

CrystalReportViewer1.ReportSource = reportDocument;
CrystalReportViewer1.ReuseParameterValuesOnRefresh = true;
CrystalReportViewer1.AutoDataBind = true;
CrystalReportViewer1.Zoom(80);


}


i don't know how to solve the issue.



asked 19 secs ago







Prompts Login window in Crystal Report in ASP.NET

Aucun commentaire:

Enregistrer un commentaire