Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my web application I have used crystal reports of Version=13.0.2000.0
I have hosted this web application on the IIS7 and we are using this application internally through the LAN network.
My application contains 10 types of reports and there are 200 simultaneous users of the application.
Initially all crystal reports works fine but after some hours (i.e. 12-15 hrs) not a single report opens up. After that I have to restart the IIS server and then after it again starts working fine. Everyday I have to go through this process. I really don't know what is happening. Because it doesn't show any types of error.

Here are the some points regarding my web application.
1) Web application is created by using Visual Studio 2010 and target framework is 4.0
2) I am using Crystal Report Version = 13.0.2000.0
3) To design the report I have created typed data set and added fields on the report.
After that while binding the report I am fetching data from the database and assigning the data source to the report.

The code I am using is as follows-

private void Show_Monthly_Report()
{
int tmp_convert_int = 0;
int EmpId = (int.TryParse(Convert.ToString(HttpContext.Current.Session["EmpId"]), out tmp_convert_int) ? tmp_convert_int : 0);
try
{

#region Monthly Log Data Table
DataTable dt = new DataTable();

dt.Columns.Add("emp_id", typeof(string));
dt.Columns.Add("emp_full_name", typeof(string));
dt.Columns.Add("checkin_datetime", typeof(string));
dt.Columns.Add("checkout_datetime", typeof(string));

bll_emp_BRB_break_log obj_bll_emp_BRB_break_log = new bll_emp_BRB_break_log();
obj_bll_emp_BRB_break_log.Get_Details_Of_Monthly_BRB_Log(EmpId, Convert.ToDateTime(txt_from_date.Text.Trim()), Convert.ToDateTime(txt_to_date.Text.Trim()));

for (int i = 0; i < obj_bll_emp_BRB_break_log.Items.Count; i++)
{
DataRow row = dt.NewRow();

row["emp_id"] = Convert.ToString(obj_bll_emp_BRB_break_log.Items[i].emp_id);
row["emp_full_name"] = Convert.ToString(obj_bll_emp_BRB_break_log.Items[i].emp_full_name);
row["checkin_datetime"] = Convert.ToString(obj_bll_emp_BRB_break_log.Items[i].checkin_datetime);
row["checkout_datetime"] = Convert.ToString(obj_bll_emp_BRB_break_log.Items[i].checkout_datetime);

dt.Rows.Add(row);
}
#endregion

ReportDocument rptDoc = new ReportDocument();

// Your .rpt file path will be below
rptDoc.Load(Server.MapPath("../Reports/rpt_Monthly_BRB.rpt"));

//set dataset to the report viewer.
rptDoc.SetDataSource(dt);

crptv_monthly_brb.ReportSource = rptDoc;

//rptDoc.Dispose();
dt.Clear();
dt.Dispose();
}
catch (Exception ex)
{

}
}
Posted
Comments
Member 7695634 7-Jan-15 12:32pm    
Please help me to find out the solution to this issue.....!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900