Example #1
0
        /// <summary>
        /// FastReports设计
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void btnDesign_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FCommon.RightCheck(this.FormID, this.RightFormID, this.FormListAID, this.FormListBID, RightSub.提交3))
                {
                    this.ShowMessage("你没有此操作权限");
                    return;
                }
                DevComponents.DotNetBar.ComboBoxItem ci = this.ToolBarCItemGet(-1, ToolButtonName.drpPrintFile.ToString());
                int tempReportID = SysConvert.ToInt32(((DevComponents.Editors.ComboItem)ci.SelectedItem).Tag);
                if (tempReportID == 0)
                {
                    this.ShowMessage("请选择报表模板");
                    return;
                }
                DataTable dt = null;
                dt = WCommon.PrintDataTable(_HTDataList);

                if (dt.Rows.Count != 0)
                {
                    FastReport.ReportRunTable(tempReportID, (int)ReportPrintType.设计, dt);
                }
                else
                {
                    this.ShowMessage("请选择要导出的数据");
                }
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }