4,816
社区成员
发帖
与我相关
我的任务
分享
//protected void Page_UnLoad(object sender, EventArgs e)
//{
// myRpt.Dispose();
//}
private void Page_Init(object sender, EventArgs e)
{
if (IsPostBack)
bind();
}
protected void bind()
{
int year = int.Parse(ddl_year.SelectedValue.ToString());
string cust_code = txt_cust_code.Text.Trim();
string cust_name = txt_cust_name.Text.Trim();
int type = rbt_amount.Checked ? 0 : 1; ;
string path = Server.MapPath("./Customer_monthly_analysis01.rpt");
myRpt.Load(path);
myRpt.SetDataSource(Get_Customer_Monthly_Analysis(year, cust_code, cust_name, type));
CrystalReportViewer1.ReportSource = myRpt;
SetRptDiscreteVale(CrystalReportViewer1, "yreaParam", ddl_year.SelectedValue.ToString());
if (type == 0)
{
SetRptDiscreteVale(CrystalReportViewer1, "typeParam", "0");
}
else
{
SetRptDiscreteVale(CrystalReportViewer1, "typeParam", "1");
}
}