コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int compid = Convert.ToInt16(Session["CompanyId"]);

        DT = Radapter.GetData(compid);
        ReportDocument rpt  = new ReportDocument();
        string         path = Server.MapPath("CRPaymentStatus.rpt");

        rpt.Load(path);
        rpt.SetDataSource((DataTable)DT);
        CrystalReportViewer1.ReportSource = rpt;
    }
コード例 #2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        bool a;

        if (DropDownList1.SelectedIndex == 0)
        {
            a = true;
        }
        else
        {
            a = false;
        }
        int compid = Convert.ToInt16(Session["CompanyId"]);

        DT = Radapter.GetDataByStatus(compid, a);
        ReportDocument rpt  = new ReportDocument();
        string         path = Server.MapPath("CRPaymentStatus.rpt");

        rpt.Load(path);
        rpt.SetDataSource((DataTable)DT);
        CrystalReportViewer1.ReportSource = rpt;
    }