public dynamic GetAgentReport([FromBody] AverageReportsFilters filters) { var userName = HttpContext.Current.GetUserName(); ReportsLayer reportsLayer = new ReportsLayer(); var response = reportsLayer.GetAgentReport(filters, userName); return(response); }
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { DataSet ds = ReportsLayer.QuestionsPerExam(int.Parse(DropDownList1.SelectedValue)); ReportDocument repdoc = new ReportDocument(); repdoc.Load(Server.MapPath("Report5.rpt")); repdoc.SetDataSource(ds); repdoc.SetParameterValue("@Ex_Id", DropDownList1.SelectedValue); CrystalReportViewer1.ReportSource = repdoc; CrystalReportViewer1.DataBind(); }
protected void Button1_Click(object sender, EventArgs e) { DataSet ds = ReportsLayer.QuestionsPerExamWithStAns(int.Parse(DropDownList1.SelectedValue), int.Parse(DropDownList2.SelectedValue)); ReportDocument repdoc = new ReportDocument(); repdoc.Load(Server.MapPath("Report6.rpt")); repdoc.SetDataSource(ds); repdoc.SetParameterValue("@Ex_Id", DropDownList1.SelectedValue); repdoc.SetParameterValue("@St_Id", DropDownList2.SelectedValue); CrystalReportViewer1.ReportSource = repdoc; CrystalReportViewer1.DataBind(); }