The ConnectionString property has not been initialized.
this is my code that calls my report:
Code: Select all
LblCourseId.Text = Request.QueryString["CourseId"];
string ConnectionString = ConfigurationManager.ConnectionStrings["KDUIS-v1ConnectionString"].ConnectionString;
string ServerLocation = HttpContext.Current.Server.MapPath(string.Empty);
StiReport MyStiReport = new StiReport();
MyStiReport.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Connection", ConnectionString));
MyStiReport.Load(ServerLocation + "\\Report\\AttendanceList.mrt");
MyStiReport.Dictionary.Variables["CourseId"].Value = LblCourseId.Text;
StiWebViewer1.Report = MyStiReport;
Code: Select all
<add name="KDUIS-v1ConnectionString" connectionString="Data Source=address of my site ;Initial Catalog= my db ;Persist Security Info=True;User ID=username ;Password= password " providerName="System.Data.SqlClient" />