Problem in Deploying crystal Report On Serverhttp://forums.asp.net/t/1797091.aspx/1?Problem+in+Deploying+crystal+Report+On+ServerThu, 03 May 2012 04:01:12 -040017970914952015http://forums.asp.net/p/1797091/4952015.aspx/1?Problem+in+Deploying+crystal+Report+On+ServerProblem in Deploying crystal Report On Server <p>hi all</p> <p>my Crysatl Report is working Fine in Local machine.. when i tried to deploy on Server its giving Error Message as &quot; Data Base Log On Failed&quot;</p> <p>While creating CR i gave my Local server Authentication Details and while deploying its not taking server side authentiacation</p> <p>can any one suggest me wat to do&nbsp; its urgent...?</p> 2012-04-26T05:59:45-04:004952043http://forums.asp.net/p/1797091/4952043.aspx/1?Re+Problem+in+Deploying+crystal+Report+On+ServerRe: Problem in Deploying crystal Report On Server <p>Hi</p> <p>&nbsp; &nbsp; &nbsp; Hope ur using Oracle as database. if So Please check the below mentioned code.</p> <p></p> <p>public static ReportDocument ConnectionInfo(ReportDocument rpt, string TableLocation)<br> {</p> <p>try<br> {<br> ReportDocument crSubreportDocument;<br> string[] strConnection = ConfigurationManager.ConnectionStrings[(&quot;AppConn&quot;)].ConnectionString.Split(new char[] { ';' });<br> Database oCRDb = rpt.Database;<br> Tables oCRTables = oCRDb.Tables;<br> CrystalDecisions.CrystalReports.Engine.Table oCRTable = default(CrystalDecisions.CrystalReports.Engine.Table);<br> TableLogOnInfo oCRTableLogonInfo = default(CrystalDecisions.Shared.TableLogOnInfo);<br> ConnectionInfo oCRConnectionInfo = new CrystalDecisions.Shared.ConnectionInfo();</p> <p>oCRConnectionInfo.ServerName = strConnection[0].Split(new char[] { '=' }).GetValue(1).ToString();<br> oCRConnectionInfo.Password = strConnection[2].Split(new char[] { '=' }).GetValue(1).ToString();<br> oCRConnectionInfo.UserID = strConnection[1].Split(new char[] { '=' }).GetValue(1).ToString();</p> <p>for (int i = 0; i &lt; oCRTables.Count; i&#43;&#43;)<br> {<br> oCRTable = oCRTables[i];<br> oCRTableLogonInfo = oCRTable.LogOnInfo;<br> oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo;<br> oCRTable.ApplyLogOnInfo(oCRTableLogonInfo);<br> oCRTable.Location = TableLocation &#43; &quot;.&quot; &#43; oCRTable.Location;<br> }</p> <p>for (int i = 0; i &lt; rpt.Subreports.Count; i&#43;&#43;)<br> {<br> {<br> crSubreportDocument = rpt.OpenSubreport(rpt.Subreports[i].Name);<br> oCRDb = crSubreportDocument.Database;<br> oCRTables = oCRDb.Tables;<br> foreach (CrystalDecisions.CrystalReports.Engine.Table aTable in oCRTables)<br> {<br> oCRTableLogonInfo = aTable.LogOnInfo;<br> oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo;<br> aTable.ApplyLogOnInfo(oCRTableLogonInfo);<br> aTable.Location = TableLocation &#43; &quot;.&quot; &#43; aTable.Location;<br> }</p> <p>}</p> <p>}</p> <p></p> <p>}<br> catch (Exception ex)<br> {<br> //if (ExceptionPolicy.HandleException(ex, &quot;General&quot;))<br> // throw;<br> }<br> return rpt;<br> }</p> <p>The parameter&nbsp;TableLocation U have to pass the Owner name of the Schema. &nbsp; for example</p> <p>if Your table name is Employee and the Schema user name is HRS. Pass HRS as the TableLocation. coz in Crystal report we are using only the table name.&nbsp;</p> <p></p> <p>Hope it hepls&nbsp;</p> <p>Madhuraj.M &nbsp;</p> <p>madhurajm@gmail.com</p> <p></p> <p></p> 2012-04-26T06:15:06-04:004962883http://forums.asp.net/p/1797091/4962883.aspx/1?Re+Problem+in+Deploying+crystal+Report+On+ServerRe: Problem in Deploying crystal Report On Server <p>Hi,</p> <p>For CP issue please post your question to this:</p> <p><a href="http://forums.asp.net/76.aspx/1?Crystal&#43;Reports">http://forums.asp.net/76.aspx/1?Crystal&#43;Reports</a></p> <p>You will receive more professional and exact idea from there.</p> 2012-05-03T04:01:12-04:00