/// <summary> /// 初始化Fp。 /// </summary> /// <param name="report">报表实体。</param> public void Init(Report report) { this.report = report; //获取报表样样式,判定是否可以编辑报表列。对于网格报表这样的样式,是可以编辑列的。对于交叉报表,是不能编辑列的。 BaseReportStyle reportStyle = this.report.ReportStyle; canEditColumn = reportStyle.CanEditColumn(); Sheets.Clear(); Sheets.Add(sheetMain); InitFP(); }
void reportStyleWizardElement_ReportStyleSelected(object sender, BaseReportStyle reportStyle) { foreach (Control control in pnlReportStyles.Controls) { if (control == sender as Control) { lbSummary.Text = reportStyle.GetStyleSummary(); if (report != null) { report.ReportStyle = reportStyle; } continue; } (control as ReportStyleWizardElement).SetCheckState(false); } }
public void Init(Report report) { this.report = report; BaseReportStyle style = this.report.ReportStyle; BaseReportLayoutStyle layoutStyle = this.report.ReportLayoutStyle; IReportSettingUserControl[] settingUserControls = layoutStyle.GetReportSettingControls(); TabPage tabPage; foreach (IReportSettingUserControl settingUserControl in settingUserControls) { tabPage = GetTabPage(settingUserControl); TabPages.Add(tabPage); } tabPage = GetTabPage(style.GetStyleSettingUserControl()); TabPages.Add(tabPage); }
private void InitReportStyles() { List <object> objectList = ReflectionManager.CreateInstancesByBaseClass(typeof(BaseReportStyle)); reportStyleWizardElements = new ReportStyleWizardElement[objectList.Count]; foreach (object obj in objectList) { BaseReportStyle style = obj as BaseReportStyle; int sortID = style.GetStyleSortID(); ReportStyleWizardElement reportStyleWizardElement = new ReportStyleWizardElement(); reportStyleWizardElement.ReportStyle = style; reportStyleWizardElement.ReportStyleSelected += new ReportStyleSelectedHandle(reportStyleWizardElement_ReportStyleSelected); reportStyleWizardElements[sortID] = reportStyleWizardElement; } pnlReportStyles.SuspendLayout(); for (int i = 0; i < reportStyleWizardElements.Length; i++) { pnlReportStyles.Controls.Add(reportStyleWizardElements[i] as Control); } pnlReportStyles.ResumeLayout(); }
private void Init() { BaseReportLayoutStyle baseReportLayoutStyle = report.ReportLayoutStyle; BaseReportStyle baseReportStyle = report.ReportStyle; }