سفارشی کردن قابلیت طراحی ریپورت توسط END USER - بخش اول
نویسنده: پوریا منفرد
تاریخ: ۱۳۹۲/۱۰/۱۶ ۱۳:۵
آدرس: www.dntips.ir
| مطالب | ۳۶۹۴ |
| نویسندگان | ۲۷۶ |
| گروههای مطالب | ۱۰۲۴ |
| نقشههای راه | ۱۱۹ |
| دورهها | ۱۴ |
| اشتراکها | ۱۷۹۱۴ |
using Stimulsoft.Base.Services; using Stimulsoft.Report; using Stimulsoft.Report.Components; using Stimulsoft.Report.Design; using Stimulsoft.Report.Design.Toolbars; using Stimulsoft.Report.Render; using Stimulsoft.Report.Units;
//ایجاد یک شی از ریپورت
StiReport report = new StiReport();
//ریست کردن تنظیمات به حالت پیشفرض
report.Reset();
//ریست کردن تنظیمات سرویسهای StiConfig.Reset();
//ریست کردن تنظیمات چاپ
StiSettings.Clear();
//تنظیم عنوان ریپورت به صورت دلخواه
StiOptions.Designer.DesignerTitle = title + " طراحی فرم ";
StiOptions.Designer.DesignerTitleText = title + " طراحی فرم ";
//غیرفعال شدن نمایش تب کدنویسی
StiOptions.Designer.CodeTabVisible = false;
//فعال کردن امکان RightToLeft
StiOptions.Designer.UseRightToLeftGlobalizationEditor = true;
//غیرفعال شدن قابلیت تغییر نام ریپورت توسط کاربر
StiOptions.Designer.CanDesignerChangeReportFileName = false;
//غیر فعال کردن تشخیص اتوماتیک زبان پیش فرض UI طراحی
StiOptions.Designer.UseSimpleGlobalizationEditor = false;
//تنظیم تم ریپورت از حالت استاندارد به ریبون
StiOptions.Windows.GlobalGuiStyle = StiGlobalGuiStyle.Office2010Blue;
//فعال سازی تم ریبون
StiOptions.Designer.IsRibbonGuiEnabled = true; BusinessObjectsCategory - DataSourcesCategory -VariablesCategory
StiOptions.Designer.Panels.Dictionary.ShowEmptyBusinessObjectsCategory = false; StiOptions.Designer.Panels.Dictionary.ShowEmptyDataSourcesCategory = false; StiOptions.Designer.Panels.Dictionary.ShowEmptyVariablesCategory = false;
//غیر فعال کردن سرویسهای پنل
Stimulsoft.Report.Design.Panels.StiPropertiesPanelService propPanel = Stimulsoft.Report.Design.Panels.StiPropertiesPanelService.GetService();
propPanel.ServiceEnabled = false;
Stimulsoft.Report.Design.Panels.StiDictionaryPanelService dictPanel = Stimulsoft.Report.Design.Panels.StiDictionaryPanelService.GetService();
dictPanel.ServiceEnabled = true;
Stimulsoft.Report.Design.Panels.StiReportTreePanelService treePanel = Stimulsoft.Report.Design.Panels.StiReportTreePanelService.GetService();
treePanel.ServiceEnabled = false;
Stimulsoft.Report.Design.Toolbars.StiToolsToolbarService cpanel = Stimulsoft.Report.Design.Toolbars.StiToolsToolbarService.GetService();
cpanel.ServiceEnabled = false;
StiOptions.Dictionary.BusinessObjects.AddBusinessObjectAssemblyToReferencedAssembliesAutomatically = false;
StiOptions.Dictionary.BusinessObjects.AllowProcessNullItemsInEnumerables = false;
StiOptions.Dictionary.BusinessObjects.AllowUseDataColumn = false;
StiOptions.Dictionary.BusinessObjects.AllowUseFields = false;
StiOptions.Dictionary.BusinessObjects.AllowUseProperties = false;
StiOptions.Dictionary.BusinessObjects.CheckTableDuplication = false;
StiOptions.Dictionary.ShowOnlyAliasForDataSource = true;
StiOptions.Dictionary.ShowOnlyAliasForDataColumn = true;
StiOptions.Dictionary.ShowOnlyAliasForTotal = true;
dictPanel.ShowNewButton = false;
dictPanel.ShowActionsButton = false;
dictPanel.ShowBusinessObjectNewMenuItem = false;
dictPanel.ShowCalcColumnNewMenuItem = false;
dictPanel.ShowCategoryNewMenuItem = false;
dictPanel.ShowCollapseAllMenuItem = true;
dictPanel.ShowColumnNewMenuItem = false;
dictPanel.ShowConnectionNewMenuItem = false;
dictPanel.ShowContextMenu = false;
dictPanel.ShowCreateFieldOnDoubleClick = false;
dictPanel.ShowCreateLabel = false;
dictPanel.ShowDataParameterNewMenuItem = false;
dictPanel.ShowDataSourceNewMenuItem = false;
dictPanel.ShowDataSourcesNewMenuItem = false;
dictPanel.ShowDeleteButton = false;
dictPanel.ShowDeleteForBusinessObject = false;
dictPanel.ShowDeleteForDataColumn = false;
dictPanel.ShowDeleteForDataConnection = false;
dictPanel.ShowDeleteForDataParameter = false;
dictPanel.ShowDeleteForDataRelation = false;
dictPanel.ShowDeleteForDataSource = false;
dictPanel.ShowDeleteForVariable = false;
dictPanel.ShowDeleteMenuItem = false;
dictPanel.ShowDictMergeMenuItem = false;
dictPanel.ShowDictNewMenuItem = false;
dictPanel.ShowDictOpenMenuItem = false;
dictPanel.ShowDictSaveMenuItem = false;
dictPanel.ShowDictXmlExportMenuItem = false;
dictPanel.ShowDictXmlImportMenuItem = false;
dictPanel.ShowDictXmlMergeMenuItem = false;
dictPanel.ShowDownButton = false;
dictPanel.ShowEditButton = false;
dictPanel.ShowEditForBusinessObject = false;
dictPanel.ShowEditForDataColumn = false;
dictPanel.ShowEditForDataConnection = false;
dictPanel.ShowEditForDataParameter = false;
dictPanel.ShowEditForDataRelation = false;
dictPanel.ShowEditForDataSource = false;
dictPanel.ShowEditForVariable = false;
dictPanel.ShowEditMenuItem = false;
dictPanel.ShowExpandAllMenuItem = true;
dictPanel.ShowMarkUsedMenuItem = false;
dictPanel.ShowNewButton = false;
dictPanel.ShowPropertiesForBusinessObject = false;
dictPanel.ShowPropertiesForDataColumn = false;
dictPanel.ShowPropertiesForDataConnection = false;
dictPanel.ShowPropertiesForDataParameter = false;
dictPanel.ShowPropertiesForDataRelation = false;
dictPanel.ShowPropertiesForDataSource = false;
dictPanel.ShowPropertiesForVariable = false;
dictPanel.ShowPropertiesMenuItem = false;
dictPanel.ShowRelationNewMenuItem = false;
dictPanel.ShowRelationsImportMenuItem = false;
dictPanel.ShowRemoveUnusedMenuItem = false;
dictPanel.ShowSortItemsButton = false;
dictPanel.ShowSynchronizeMenuItem = false;
dictPanel.ShowUpButton = false;
dictPanel.ShowUseAliases = true;
dictPanel.ShowVariableNewMenuItem = false;
dictPanel.ShowViewDataMenuItem = false; //تنظیم زبان به فارسی
StiConfig.LoadLocalization("fa.xml"); //تنظیم تم ریپورت از حالت استاندارد به ریبون
StiOptions.Windows.GlobalGuiStyle = StiGlobalGuiStyle.Office2010Blue;
//فعال سازی تم ریبون
StiOptions.Designer.IsRibbonGuiEnabled = true;