Пример #1
0
    private void RunReport(ReportType RType)
    {
        try
        {
            ErrorMsgLabel.Text = "";
            #region 取得資料
            MaintainGoodsInTransit BCO = new MaintainGoodsInTransit(ConntionDB);
            DataTable dt = new DataTable();

            ParameterList.Clear();
            ParameterList.Add(ViewState["ONWAY_NO"].ToString());
            dt = BCO.PrintGoodsInTransit(ParameterList);

            if (dt.Rows.Count == 0)
            {
                ErrorMsgLabel.Text = "查無資料";
                return;
            }
            else
            {
                #region 匯出報表
                ExportReport(dt, RType);
                #endregion
            }

            #endregion
        }
        catch (Exception ex)
        { this.ErrorMsgLabel.Text = ex.ToString(); }
        finally { }
    }