Mukhomedshin
Programmer
When I move my application from development db to production db it stops working and gives message "Failed to load database information". It happens on the very last line of the code below:
crvReportViewer.ReportSource = oRpt;
If I comment this line I have no error and can see the viewer (empty of course)
Can anybody give me an idea what is wrong?
FM
//--------------------
namespace sd
{
public class MyReport : System.Web.UI.Page
{
private string strSelectionFormula="";
private string strRptName="";
protected CrystalDecisions.Web.CrystalReportViewer crvReportViewer;
private ReportDocument oRpt = new ReportDocument();
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
string strConnectionString = ConfigurationSettings.AppSettings["appsqlstr"];
objConn = new SqlConnection(strConnectionString);
dataSet = new DataSet();
objAdapter = new SqlDataAdapter( strSelectionFormula, objConn);
objAdapter.Fill(dataSet, "SERVICECALLS"
oRpt.SetDataSource(dataSet);
Response.Write("<BR>"
crvReportViewer.ReportSource = oRpt;
}
crvReportViewer.ReportSource = oRpt;
If I comment this line I have no error and can see the viewer (empty of course)
Can anybody give me an idea what is wrong?
FM
//--------------------
namespace sd
{
public class MyReport : System.Web.UI.Page
{
private string strSelectionFormula="";
private string strRptName="";
protected CrystalDecisions.Web.CrystalReportViewer crvReportViewer;
private ReportDocument oRpt = new ReportDocument();
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
string strConnectionString = ConfigurationSettings.AppSettings["appsqlstr"];
objConn = new SqlConnection(strConnectionString);
dataSet = new DataSet();
objAdapter = new SqlDataAdapter( strSelectionFormula, objConn);
objAdapter.Fill(dataSet, "SERVICECALLS"
oRpt.SetDataSource(dataSet);
Response.Write("<BR>"
crvReportViewer.ReportSource = oRpt;
}