Click here to Skip to main content
Sign Up to vote bad
good
See more: CrystalReports
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 2 May '12 - 21:32
Edited 3 May '12 - 0:51

Comments
Mantu Singh - 3 May '12 - 5:00
pls give more info code where you encounter the error so we may be able help u
amritha444 - 3 May '12 - 6:47
Hi This 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
GanesanSenthilvel - 3 May '12 - 12:40
Not getting any problem. Could you share the details of the problem?

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 375
1 Sergey Alexandrovich Kryukov 173
2 Abhinav S 168
3 Guirec Le Bars 120
4 Ron Beyer 100
0 Sergey Alexandrovich Kryukov 8,439
1 OriginalGriff 6,681
2 CPallini 3,553
3 Rohan Leuva 2,793
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 3 May 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid