Windows 프로젝트 용 Crystal Reports를 작성했습니다. Visual Studio에서 실행할 때 제대로 작동합니다. (저는 VS 2010을 사용하고 있습니다). 하지만 설치 프로젝트를 만들고 클라이언트 PC에 소프트웨어를 설치 한 후에는 작동하지 않습니다.프로젝트 설정을 작성한 후 Crystal 보고서가 작동하지 않습니다.
http://tistus.srilanka-erickson.com/errors.html
표시 다음은 내가 결정 보고서를로드하는 데 사용한 버튼 클릭 이벤트 코드입니다 : 첫 번째 절은 보고서에 사용자 입력을 등록하는 데 사용 된 시도, 그 사이에 두 번째 나는 다음과 같은 오류를 얻을 수 try 절은 보고서에 대한 데이터베이스 연결을 수동으로 만드는 데 사용되었습니다. 세 번째 try 절은 보고서를로드하는 데 사용되었습니다.
private void buttonGenerateSecExportRpt_Click(object sender, EventArgs e)
{
CrystalDecisions.CrystalReports.Engine.ReportDocument cryRpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
if (comboBoxSecPlateType.Text != "" && comboBoxSecExPlateBrand.Text != "")
{
try
{
dtFrom.Format = DateTimePickerFormat.Custom;
string periodfrom = dtFrom.Value.ToString("yyyy/MM/dd");
dtTo.Format = DateTimePickerFormat.Custom;
string periodto = dtTo.Value.ToString("yyyy/MM/dd");
//cryRpt.VerifyDatabase();
string fullPath = "..\\..\\SecondaryPlateExportReport.rpt";
cryRpt.Load(fullPath);
cryRpt.SetParameterValue("dateFromChecked", dtFrom.Checked);
cryRpt.SetParameterValue("dateToChecked", dtTo.Checked);
cryRpt.SetParameterValue("dtPeriodFrom", periodfrom);
cryRpt.SetParameterValue("dtPeriodTo", periodto);
cryRpt.SetParameterValue("PlateType", comboBoxSecPlateType.Text.Trim());
cryRpt.SetParameterValue("PlateBrand", comboBoxSecExPlateBrand.Text.Trim());
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try
{
DbConnectionInfo.SetConnectionString(ConfigurationManager.ConnectionStrings["con"].ToString());
TableLogOnInfo logOnInfo;
ConnectionInfo connectionInfo;
foreach (Table table in cryRpt.Database.Tables)
{
logOnInfo = table.LogOnInfo;
connectionInfo = logOnInfo.ConnectionInfo;
// Set the Connection parameters.
connectionInfo.DatabaseName = DbConnectionInfo.InitialCatalog;
connectionInfo.ServerName = DbConnectionInfo.ServerName;
if (!DbConnectionInfo.UseIntegratedSecurity)
{
connectionInfo.Password = DbConnectionInfo.Password;
connectionInfo.UserID = DbConnectionInfo.UserName;
}
else
{
connectionInfo.IntegratedSecurity = true;
}
table.ApplyLogOnInfo(logOnInfo);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try
{
crystalReportViewerSecEx.ReportSource = cryRpt;
crystalReportViewerSecEx.Refresh();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
MessageBox.Show("Please select both Plate Type and the Brand to Generate the Report!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
클라이언트 컴퓨터에 소프트웨어를 배포 한 후에 수정 보고서를 작성하려고합니다. 어떤 제안이라도 대단히 감사하겠습니다!