1
請幫助,我正在創建一個簡單的水晶報告,查看我們的呼叫中心未完成的日誌,我有一個存儲過程,檢索所有我需要的信息。在這裏它變得有趣。 該報告檢索所有相關數據並向我顯示第一頁。當我嘗試查看第二頁時,我收到以下「您請求的報告需要更多信息」,然後請求登錄憑證,當我嘗試轉到最後一頁時的報告,我得到以下錯誤「無法連接:不正確的登錄參數。」 使用Crystal Viewer我可以查看我的報告,當我用10天測試時,它有大約50頁左右的頁面。我已使用Google搜索,但沒有建議的所有解決方案似乎工作 我使用以下內容:SQL Server 2005速成版; VS2008; Crystal報告版本10.5 .... 繼承人我使用的代碼。 我的連接字符串看起來是這樣的:LOGON問題與水晶報告
Data Source=ServerName\SQLEXPRESS;Initial Catalog=DBNAME;Integrated Security=True;
我使用Windows身份驗證登錄。 在此先感謝。
try
{
CrystalReport1 myRpt = new CrystalReport1();
CrystalReportViewer1.DisplayGroupTree = false;
CrystalReportViewer1.DisplayToolbar = true;
string myConstr = ConfigurationManager.AppSettings["ConnectionString"];
SqlConnection myConnection = new SqlConnection(myConstr);
SqlDataAdapter myAdapter = new SqlDataAdapter();
DataSet1 myDataSet = new DataSet1();
SqlCommand MyCommand = myConnection.CreateCommand();
MyCommand.CommandText = "procName";
MyCommand.CommandType = CommandType.StoredProcedure;
myAdapter.SelectCommand = MyCommand;
myAdapter.SelectCommand.Parameters.Add(new SqlParameter("@myPara", Convert.ToInt32(txtDays.Text)));
myAdapter.Fill(myDataSet, "procName");
CrystalReportViewer1.ReportSource = myRpt;
CrystalReportViewer1.DataBind();
}
catch (Exception ex)
{
string strEX;
Page.ClientScript.RegisterStartupScript(this.GetType(), "Warning", "alert('Enter Day Criteria Please!!!');", true);
}