On my development machine, it runs properly, the report is being generated as expected.
On the deployed machine, the report is throwing an error:
When I run the application on debug, there was a Stack Overflow exception which happens on System.Drawing.dll.
In my code, the application would specifically hang at this line:
Code: Select all
StiReport appReport = new StiReport();
Code: Select all
private void PreviewReport(int FromMonthID, int FromYear,
int ToMonthID, int ToYear,
int ProvinceID, string ReportObject)
{
string generatedDate = String.Format("{0:MMMM d, yyyy}", DateTime.Today);
string dbServer = System.Configuration.ConfigurationManager.AppSettings["DBServer"];
dbServer = dbServer.Replace(@"\\", @"\");
string dbDatabase = "Valid Values Here.";
string dbUser = "Valid Values Here.";
string dbPassword = "Valid Values Here.";
string connectionString = "User ID=" + dbUser + ";Initial Catalog=" + dbDatabase + ";Password=" + dbPassword + ";Integrated Security=False;Data Source=" + dbServer;
string reportMapPath = string.Empty;
switch (ReportObject.ToUpper())
{
case "A":
reportMapPath = "reports\\A.mrt";
break;
case "B":
reportMapPath = "reports\\B.mrt";
break;
case "C":
reportMapPath = "reports\\C.mrt";
break;
case "D":
reportMapPath = "reports\\D.mrt";
break;
case "RBYLP":
reportMapPath = "reports\\E.mrt";
break;
}
StiReport appReport = new StiReport();
appReport.Load(Server.MapPath(reportMapPath));
appReport.Dictionary.Databases.Clear();
appReport.Dictionary.Databases.Add(new StiSqlDatabase("WineTracker", connectionString));
appReport.Compile();
}
Anyone encountered this issue?