2016-09-23 3 views
0

저는 VS 2010 용 Crystal Reports SP 13.0.17 (VS 2015에서도 사용됨) 및 SQL Server 2014 용 ODBC를 사용하고 있습니다. 외부 보고서), 올바른 자격 증명이 제공 되더라도 데이터베이스에 대한 로그인 대화 상자가 표시됩니다. 대화 상자에서 사용자 이름과 암호를 다시 입력하면 사용자 이름 또는 암호가 올바르지 않다고 말하는 오류가 발생합니다.VS 용 Crystal Reports가 Windows 10에서 SQL에 연결되지 않습니다.

Windows 10에서만 발생합니다. Windows XP 또는 Windows 7에서 실행하면 올바르게 작동합니다.

Crystal Reports에서 보고서를 실행하면 보고서가 데이터베이스에 연결됩니다. ODBC 연결은 Crystal이 아닌 다른 프로그램에서 작동합니다.

이 버그는 무엇입니까? 아니면 누락 되었습니까?

ReportDocument cryRpt = new ReportDocument(); 

cryRpt.Load(strFilename); 
cryRpt.PrintOptions.PrinterName = strPrinterName; 
this.Name = this.Text = Path.GetFileNameWithoutExtension(strFilename); 
cryRpt.SetDatabaseLogon(strDBUser, strDBPwd, strDBServer, strDBDatabase); 

cryRpt.RecordSelectionFormula = strSelForm; 

foreach (var pair in dctParams) 
try 
{ 
    cryRpt.SetParameterValue(pair.Key, pair.Value); 
} 
catch (Exception ex) 
{ 
    MessageBox.Show("Parameter: " + pair.Key + ", Value: " + pair.Value.ToString() + ", Type: " + pair.Value.GetType() + ", was not passed correctly", "Error"); 
} 

crystalReportViewer1.ViewTimeSelectionFormula = strSelForm; 
crystalReportViewer1.SelectionFormula = strSelForm; 
crystalReportViewer1.ShowExportButton = bShowExport; 
crystalReportViewer1.ShowPrintButton = bShowPrint; 
crystalReportViewer1.ShowParameterPanelButton = bShowParam; 
crystalReportViewer1.ShowGroupTreeButton = bShowGroup; 
if(!bShowParamPanel) 
    crystalReportViewer1.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None; 

crystalReportViewer1.ReportSource = cryRpt; 

if (bShowForm) 
{ 
    if (!this.ShowInTaskbar) 
     this.ShowInTaskbar = true; 

    if (this.WindowState == FormWindowState.Minimized) 
     this.WindowState = FormWindowState.Maximized; 
    crystalReportViewer1.Refresh(); 
    if (bPrint) cryRpt.PrintToPrinter(1, false, 0, 0); 
} 
else 
{ 
    cryRpt.PrintToPrinter(1, false, 0, 0); 
    this.Close(); 
} 

답변

0

나는 새 프로젝트를 만들어 작업을했고, 내 코드를 복사.

관련 문제