Please Help,
I am creating a Simple Crystal report that views outstanding logs for our call centre.
I have a stored procedure that retrieves all the Info I need.
Here is where it gets interesting. The Report retrives all the relevant data and shows me page One. When I try to view the second page I get the following
"The report you requested requires further information" .
It then requests Logon Credentials and when I attempt to go to the last Page of the Report I get the following Error
"Unable to connect: incorrect log on parameters."
Using Crystal Viewer I can view my Report; it has about 50 or so pages when I test with 10 days.
I have googled but none of the suggested solutions seem to work.
I use the following: SQL Server 2005 Express Edition; VS2008; Crystal reports Version 10.5.
Heres the code I use.
My Connection String looks like this:
I use windows authentication to logon.
Thanks in advance.
Data Source=ServerName\SQLEXPRESS;Initial Catalog=DBNAME;Integrated Security=True;
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);
}