Click here to Skip to main content
16,020,459 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All

I installed a project developed in windows application .NET and sql server 2005.I used Crystal report .The problem is related with crystal report.Report coming well in first login again its showing like load report failed.if we close and restart application it works fine for first time.I use odbc connection technique for this.why happening so ?Any solution for this problem.Iam pasting my code too

Quote:
objRep.cry_rp1.ReportSource = Application.StartupPath + @"\Reports\Crt_Purchase_Order.rpt";
objRep.cry_rp1.SelectionFormula = "{OT_PURCHASE_ORDER.PO_Tran_Code} = '" + txtrancode.Text+"/"+txtdocno.Text + "' ";



Quote:
private void ConfigureCrystalReports()
{
string Crystaluser = Convert.ToString(System.Configuration.ConfigurationSettings.AppSettings["Crystaluser"]);
string CrystalPasword = Convert.ToString(System.Configuration.ConfigurationSettings.AppSettings["CrystalPassword"]);
string CrystalDatasource = Convert.ToString(System.Configuration.ConfigurationSettings.AppSettings["CrystalDatasource"]);
string CrystalHostname = Convert.ToString(System.Configuration.ConfigurationSettings.AppSettings["CrystalHostname"]);
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.ServerName = CrystalHostname;
connectionInfo.DatabaseName = CrystalDatasource;
connectionInfo.UserID = Crystaluser;
connectionInfo.Password = CrystalPasword;
connectionInfo.IntegratedSecurity = false;
SetDBLogonForReport(connectionInfo);
}
private void SetDBLogonForReport(ConnectionInfo connectionInfo)
{
TableLogOnInfos tableLogOnInfos = cry_rp1.LogOnInfo;
foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
{
tableLogOnInfo.ConnectionInfo = connectionInfo;
}
}


Thanks in Advance
Amrutha
Posted
Updated 3-May-12 0:51am
v2
Comments
Mantu Singh 3-May-12 5:00am    
pls give more info code where you encounter the error so we may be able help u
amritha444 3-May-12 6:47am    
HiThis working well in my system.Problem happening when installed to client machine.Loding report failed showing.Where i installed crystal report redistribution package 2008 for crystal report.Other than this only .NET framework and sqlserver in client machine.what may be the problem??

Thanks in Advance
Amrutha
Ganesan Senthilvel 3-May-12 12:40pm    
Not getting any problem. Could you share the details of the problem?

1 solution

amritha444 wrote:
Report coming well in first login again its showing like load report failed.

Crystal Reports: Fix for "Load report failed" error.[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900