From a9f43ca3202664ed83d6a5859a3e75b168d138f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Thu, 8 Jan 2026 00:00:24 +0300 Subject: [PATCH] TemplateReport --- .../Seeds/ListFormSeeder_Administration.cs | 6 +- .../PlatformConsts.cs | 3 +- .../TemplateReport.Designer.cs | 104 ++----- .../PredefinedReports/TestReport.Designer.cs | 259 ++++++++++++++++++ .../PredefinedReports/TestReport.cs | 9 + .../PredefinedReports/TestReport.resx | 123 +++++++++ .../CustomReportStorageWebExtension.cs | 2 +- 7 files changed, 425 insertions(+), 81 deletions(-) create mode 100644 api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.Designer.cs create mode 100644 api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.cs create mode 100644 api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.resx diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index 94e4ed4a..8d3d6cd0 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -5999,7 +5999,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep Text ="View", UrlTarget="_blank", AuthName = listFormName, - Url=$"/admin/reports/TemplateReport/view?name=@Id", + Url=$"/admin/reports/TemplateReport/view?id=@Id", IsVisible = true, }, new() { @@ -6007,7 +6007,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep Text ="Design", UrlTarget="_blank", AuthName = listFormName + ".Update", - Url=$"/admin/reports/TemplateReport/design?name=@Id", + Url=$"/admin/reports/TemplateReport/design?id=@Id", IsVisible = true, }, }), @@ -6117,7 +6117,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep FieldName = "HtmlContent", Width = 250, ListOrderNo = 6, - Visible = true, + Visible = false, IsActive = true, IsDeleted = false, ColumnCustomizationJson = DefaultColumnCustomizationJson, diff --git a/api/src/Erp.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Erp.Platform.Domain.Shared/PlatformConsts.cs index fe3d1cb3..64880f7d 100644 --- a/api/src/Erp.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Erp.Platform.Domain.Shared/PlatformConsts.cs @@ -18,7 +18,8 @@ public static class PlatformConsts { public static string Disabled = "{ \"disabled\" : true }"; public static string ShowClearButton = "{ \"showClearButton\" : true }"; - public static string HtmlEditorOptions = "{\"toolbar\": {\"multiline\": true, \"items\": [{\"name\": \"undo\"},{\"name\": \"redo\"},{\"name\": \"separator\"},{\"name\": \"size\",\"acceptedValues\": [\"8pt\",\"10pt\",\"12pt\",\"14pt\",\"18pt\",\"24pt\",\"36pt\"],\"options\": {\"inputAttr\": {\"aria-label\": \"Font size\"}}},{\"name\": \"font\",\"acceptedValues\": [\"Arial\",\"Courier New\",\"Georgia\",\"Impact\",\"Lucida Console\",\"Tahoma\",\"Times New Roman\",\"Verdana\"],\"options\": {\"inputAttr\": {\"aria-label\": \"Font family\"}}},{\"name\": \"separator\"},{\"name\": \"bold\"},{\"name\": \"italic\"},{\"name\": \"strike\"},{\"name\": \"underline\"},{\"name\": \"separator\"},{\"name\": \"alignLeft\"},{\"name\": \"alignCenter\"},{\"name\": \"alignRight\"},{\"name\": \"alignJustify\"},{\"name\": \"separator\"},{\"name\": \"orderedList\"},{\"name\": \"bulletList\"},{\"name\": \"separator\"},{\"name\": \"header\",\"acceptedValues\": [false,1,2,3,4,5],\"options\": {\"inputAttr\": {\"aria-label\": \"Font family\"}}},{\"name\": \"separator\"},{\"name\": \"color\"},{\"name\": \"background\"},{\"name\": \"separator\"},{\"name\": \"link\"},{\"name\": \"image\"},{\"name\": \"separator\"},{\"name\": \"clear\"},{\"name\": \"codeBlock\"},{\"name\": \"blockquote\"},{\"name\": \"separator\"},{\"name\": \"insertTable\"},{\"name\": \"deleteTable\"},{\"name\": \"insertRowAbove\"},{\"name\": \"insertRowBelow\"},{\"name\": \"deleteRow\"},{\"name\": \"insertColumnLeft\"},{\"name\": \"insertColumnRight\"},{\"name\": \"deleteColumn\"}]}}"; + public static string HtmlEditorOptions = "{\"toolbar\": {\"multiline\": true, \"items\": [{\"name\": \"undo\"},{\"name\": \"redo\"},{\"name\": \"separator\"},{\"name\": \"size\",\"acceptedValues\": [\"8pt\",\"10pt\",\"12pt\",\"14pt\",\"18pt\",\"24pt\",\"36pt\"],\"options\": {\"inputAttr\": {\"aria-label\": \"Font size\"}}},{\"name\": \"font\",\"acceptedValues\": [\"Arial\",\"Courier New\",\"Georgia\",\"Impact\",\"Lucida Console\",\"Tahoma\",\"Times New Roman\",\"Verdana\"],\"options\": {\"inputAttr\": {\"aria-label\": \"Font family\"}}},{\"name\": \"separator\"},{\"name\": \"bold\"},{\"name\": \"italic\"},{\"name\": \"strike\"},{\"name\": \"underline\"},{\"name\": \"separator\"},{\"name\": \"alignLeft\"},{\"name\": \"alignCenter\"},{\"name\": \"alignRight\"},{\"name\": \"alignJustify\"},{\"name\": \"separator\"},{\"name\": \"orderedList\"},{\"name\": \"bulletList\"},{\"name\": \"separator\"},{\"name\": \"header\",\"acceptedValues\": [false,1,2,3,4,5],\"options\": {\"inputAttr\": {\"aria-label\": \"Font family\"}}},{\"name\": \"separator\"},{\"name\": \"color\"},{\"name\": \"background\"},{\"name\": \"separator\"},{\"name\": \"link\"},{\"name\": \"image\"},{\"name\": \"separator\"},{\"name\": \"clear\"},{\"name\": \"codeBlock\"},{\"name\": \"blockquote\"},{\"name\": \"separator\"},{\"name\": \"insertTable\"},{\"name\": \"deleteTable\"},{\"name\": \"insertRowAbove\"},{\"name\": \"insertRowBelow\"},{\"name\": \"deleteRow\"},{\"name\": \"insertColumnLeft\"},{\"name\": \"insertColumnRight\"},{\"name\": \"deleteColumn\"},{\"name\":\"cellProperties\"},{\"name\":\"tableProperties\"}]}}"; + // public static string HtmlEditorOptions = "{\"toolbar\":{\"multiline\":true,\"items\":[{\"name\":\"ai\",\"commands\":[{\"name\":\"summarize\"},{\"name\":\"proofread\"},{\"name\":\"expand\"},{\"name\":\"shorten\"},{\"name\":\"changeStyle\"},{\"name\":\"changeTone\"},{\"name\":\"translate\"},{\"name\":\"askAI\"}]},{\"name\":\"separator\"},{\"name\":\"undo\"},{\"name\":\"redo\"},{\"name\":\"separator\"},{\"name\":\"size\"},{\"name\":\"font\"},{\"name\":\"separator\"},{\"name\":\"bold\"},{\"name\":\"italic\"},{\"name\":\"underline\"},{\"name\":\"strike\"},{\"name\":\"separator\"},{\"name\":\"alignLeft\"},{\"name\":\"alignCenter\"},{\"name\":\"alignRight\"},{\"name\":\"alignJustify\"},{\"name\":\"separator\"},{\"name\":\"orderedList\"},{\"name\":\"bulletList\"},{\"name\":\"separator\"},{\"name\":\"header\"},{\"name\":\"separator\"},{\"name\":\"color\"},{\"name\":\"background\"},{\"name\":\"separator\"},{\"name\":\"link\"},{\"name\":\"image\"},{\"name\":\"separator\"},{\"name\":\"clear\"},{\"name\":\"codeBlock\"},{\"name\":\"blockquote\"},{\"name\":\"separator\"},{\"name\":\"insertTable\"},{\"name\":\"insertHeaderRow\"},{\"name\":\"insertRowAbove\"},{\"name\":\"insertRowBelow\"},{\"name\":\"insertColumnLeft\"},{\"name\":\"insertColumnRight\"},{\"name\":\"separator\"},{\"name\":\"deleteRow\"},{\"name\":\"deleteColumn\"},{\"name\":\"deleteTable\"},{\"name\":\"separator\"},{\"name\":\"cellProperties\"},{\"name\":\"tableProperties\"}]},\"mediaResizing\":{\"enabled\":true},\"imageUpload\":{\"fileUploadMode\":\"base64\"},\"tableResizing\":{\"enabled\":true},\"tableContextMenu\":{\"enabled\":true}}"; public static string PhoneEditorOptions = "{\"format\": \"phoneGlobal\", \"mask\":\"(000) 000-0000\", \"maskInvalidMessage\":\"Lütfen geçerli bir telefon numarası girin\", \"useMaskedValue\":false, \"maskRules\": { \"X\": \"[0-9]\" }, \"placeholder\": \"(555) 123-4567\" }"; public static string TimeSpanOptions = "{\"type\":\"time\",\"pickerType\":\"list\",\"displayFormat\":\"HH:mm\",\"dateSerializationFormat\":\"yyyy-MM-ddTHH:mm:ss\",\"interval\":5,\"width\":\"100%\"}"; public static string NumberStandartFormat(int precision = 2) => "{ \"format\": { \"type\": \"fixedPoint\", \"precision\": " + precision + " }, \"useMaskBehavior\": true, \"showSpinButtons\": false }"; diff --git a/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TemplateReport.Designer.cs b/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TemplateReport.Designer.cs index dd03b155..50452f6b 100644 --- a/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TemplateReport.Designer.cs +++ b/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TemplateReport.Designer.cs @@ -11,8 +11,10 @@ /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) { - if(disposing && (components != null)) { + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { components.Dispose(); } base.Dispose(disposing); @@ -24,14 +26,13 @@ /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// - private void InitializeComponent() { + private void InitializeComponent() + { this.components = new System.ComponentModel.Container(); DevExpress.DataAccess.Sql.SelectQuery selectQuery1 = new DevExpress.DataAccess.Sql.SelectQuery(); DevExpress.DataAccess.Sql.Column column1 = new DevExpress.DataAccess.Sql.Column(); DevExpress.DataAccess.Sql.ColumnExpression columnExpression1 = new DevExpress.DataAccess.Sql.ColumnExpression(); DevExpress.DataAccess.Sql.Table table1 = new DevExpress.DataAccess.Sql.Table(); - DevExpress.DataAccess.Sql.Column column2 = new DevExpress.DataAccess.Sql.Column(); - DevExpress.DataAccess.Sql.ColumnExpression columnExpression2 = new DevExpress.DataAccess.Sql.ColumnExpression(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TemplateReport)); this.TopMargin = new DevExpress.XtraReports.UI.TopMarginBand(); this.BottomMargin = new DevExpress.XtraReports.UI.BottomMarginBand(); @@ -40,17 +41,16 @@ this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.label1 = new DevExpress.XtraReports.UI.XRLabel(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); - this.table2 = new DevExpress.XtraReports.UI.XRTable(); + this.table1 = new DevExpress.XtraReports.UI.XRTable(); this.tableRow1 = new DevExpress.XtraReports.UI.XRTableRow(); - this.tableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); - this.tableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrRichText1 = new DevExpress.XtraReports.UI.XRRichText(); this.sqlDataSource1 = new DevExpress.DataAccess.Sql.SqlDataSource(this.components); this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); this.DetailCaption1 = new DevExpress.XtraReports.UI.XRControlStyle(); this.DetailData1 = new DevExpress.XtraReports.UI.XRControlStyle(); this.DetailData3_Odd = new DevExpress.XtraReports.UI.XRControlStyle(); this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle(); - ((System.ComponentModel.ISupportInitialize)(this.table2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // TopMargin @@ -81,82 +81,35 @@ this.pageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; this.pageInfo2.TextFormatString = "Page {0} of {1}"; // - // ReportHeader - // - this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { - this.label1}); - this.ReportHeader.HeightF = 60F; - this.ReportHeader.Name = "ReportHeader"; - // - // label1 - // - this.label1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); - this.label1.Name = "label1"; - this.label1.SizeF = new System.Drawing.SizeF(650F, 24.19433F); - this.label1.StyleName = "Title"; - this.label1.Text = "Sector Report"; - // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { - this.table2}); - this.Detail.HeightF = 25F; + this.xrRichText1}); + this.Detail.HeightF = 200F; this.Detail.Name = "Detail"; + this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // - // table2 - // - this.table2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); - this.table2.Name = "table2"; - this.table2.OddStyleName = "DetailData3_Odd"; - this.table2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { - this.tableRow1}); - this.table2.SizeF = new System.Drawing.SizeF(650F, 25F); - // - // tableRow1 - // - this.tableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { - this.tableCell1, - this.tableCell2}); - this.tableRow1.Name = "tableRow1"; - this.tableRow1.Weight = 1D; - // - // tableCell1 - // - this.tableCell1.Borders = DevExpress.XtraPrinting.BorderSide.None; - this.tableCell1.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { - new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Id]")}); - this.tableCell1.Name = "tableCell1"; - this.tableCell1.StyleName = "DetailData1"; - this.tableCell1.StylePriority.UseBorders = false; - this.tableCell1.Text = "Id"; - this.tableCell1.Weight = 0.3D; - // - // tableCell2 - // - this.tableCell2.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { - new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Name]")}); - this.tableCell2.Name = "tableCell2"; - this.tableCell2.StyleName = "DetailData1"; - this.tableCell2.Text = "Name"; - this.tableCell2.Weight = 0.7D; + // xrRichText1 + // + this.xrRichText1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrRichText1.Name = "xrRichText1"; + this.xrRichText1.SizeF = new System.Drawing.SizeF(650F, 200F); + this.xrRichText1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Html", null, "Sas_T_ReportTemplate.HtmlContent")}); // // sqlDataSource1 // this.sqlDataSource1.ConnectionName = "SqlServer"; this.sqlDataSource1.Name = "sqlDataSource1"; - columnExpression1.ColumnName = "Id"; - table1.Name = "Sas_T_Sector"; + table1.Name = "Sas_T_ReportTemplate"; + columnExpression1.ColumnName = "HtmlContent"; columnExpression1.Table = table1; column1.Expression = columnExpression1; - columnExpression2.ColumnName = "Name"; - columnExpression2.Table = table1; - column2.Expression = columnExpression2; selectQuery1.Columns.Add(column1); - selectQuery1.Columns.Add(column2); - selectQuery1.Name = "Sas_T_Sector"; + selectQuery1.Name = "Sas_T_ReportTemplate"; selectQuery1.Tables.Add(table1); - this.sqlDataSource1.Queries.AddRange(new DevExpress.DataAccess.Sql.SqlQuery[] { - selectQuery1}); + this.sqlDataSource1.Queries.AddRange(new DevExpress.DataAccess.Sql.SqlQuery[] { selectQuery1 }); this.sqlDataSource1.ResultSchemaSerializable = resources.GetString("sqlDataSource1.ResultSchemaSerializable"); // // Title @@ -221,7 +174,7 @@ this.Detail}); this.ComponentStorage.AddRange(new System.ComponentModel.IComponent[] { this.sqlDataSource1}); - this.DataMember = "Sas_T_Sector"; + this.DataMember = "Sas_T_ReportTemplate"; this.DataSource = this.sqlDataSource1; this.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F); this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] { @@ -231,7 +184,7 @@ this.DetailData3_Odd, this.PageInfo}); this.Version = "22.2"; - ((System.ComponentModel.ISupportInitialize)(this.table2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); } @@ -245,10 +198,9 @@ private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; private DevExpress.XtraReports.UI.XRLabel label1; private DevExpress.XtraReports.UI.DetailBand Detail; - private DevExpress.XtraReports.UI.XRTable table2; + private DevExpress.XtraReports.UI.XRRichText xrRichText1; + private DevExpress.XtraReports.UI.XRTable table1; private DevExpress.XtraReports.UI.XRTableRow tableRow1; - private DevExpress.XtraReports.UI.XRTableCell tableCell1; - private DevExpress.XtraReports.UI.XRTableCell tableCell2; private DevExpress.DataAccess.Sql.SqlDataSource sqlDataSource1; private DevExpress.XtraReports.UI.XRControlStyle Title; private DevExpress.XtraReports.UI.XRControlStyle DetailCaption1; diff --git a/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.Designer.cs b/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.Designer.cs new file mode 100644 index 00000000..e779d7e7 --- /dev/null +++ b/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.Designer.cs @@ -0,0 +1,259 @@ +namespace Erp.Reports.PredefinedReports +{ + partial class TestReport + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if(disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); + DevExpress.DataAccess.Sql.SelectQuery selectQuery1 = new DevExpress.DataAccess.Sql.SelectQuery(); + DevExpress.DataAccess.Sql.Column column1 = new DevExpress.DataAccess.Sql.Column(); + DevExpress.DataAccess.Sql.ColumnExpression columnExpression1 = new DevExpress.DataAccess.Sql.ColumnExpression(); + DevExpress.DataAccess.Sql.Table table1 = new DevExpress.DataAccess.Sql.Table(); + DevExpress.DataAccess.Sql.Column column2 = new DevExpress.DataAccess.Sql.Column(); + DevExpress.DataAccess.Sql.ColumnExpression columnExpression2 = new DevExpress.DataAccess.Sql.ColumnExpression(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TemplateReport)); + this.TopMargin = new DevExpress.XtraReports.UI.TopMarginBand(); + this.BottomMargin = new DevExpress.XtraReports.UI.BottomMarginBand(); + this.pageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo(); + this.pageInfo2 = new DevExpress.XtraReports.UI.XRPageInfo(); + this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); + this.label1 = new DevExpress.XtraReports.UI.XRLabel(); + this.Detail = new DevExpress.XtraReports.UI.DetailBand(); + this.table2 = new DevExpress.XtraReports.UI.XRTable(); + this.tableRow1 = new DevExpress.XtraReports.UI.XRTableRow(); + this.tableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); + this.tableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.sqlDataSource1 = new DevExpress.DataAccess.Sql.SqlDataSource(this.components); + this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); + this.DetailCaption1 = new DevExpress.XtraReports.UI.XRControlStyle(); + this.DetailData1 = new DevExpress.XtraReports.UI.XRControlStyle(); + this.DetailData3_Odd = new DevExpress.XtraReports.UI.XRControlStyle(); + this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle(); + ((System.ComponentModel.ISupportInitialize)(this.table2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + // + // TopMargin + // + this.TopMargin.Name = "TopMargin"; + // + // BottomMargin + // + this.BottomMargin.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.pageInfo1, + this.pageInfo2}); + this.BottomMargin.Name = "BottomMargin"; + // + // pageInfo1 + // + this.pageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.pageInfo1.Name = "pageInfo1"; + this.pageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime; + this.pageInfo1.SizeF = new System.Drawing.SizeF(325F, 23F); + this.pageInfo1.StyleName = "PageInfo"; + // + // pageInfo2 + // + this.pageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(325F, 0F); + this.pageInfo2.Name = "pageInfo2"; + this.pageInfo2.SizeF = new System.Drawing.SizeF(325F, 23F); + this.pageInfo2.StyleName = "PageInfo"; + this.pageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.pageInfo2.TextFormatString = "Page {0} of {1}"; + // + // ReportHeader + // + this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.label1}); + this.ReportHeader.HeightF = 60F; + this.ReportHeader.Name = "ReportHeader"; + // + // label1 + // + this.label1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.label1.Name = "label1"; + this.label1.SizeF = new System.Drawing.SizeF(650F, 24.19433F); + this.label1.StyleName = "Title"; + this.label1.Text = "Sector Report"; + // + // Detail + // + this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.table2}); + this.Detail.HeightF = 25F; + this.Detail.Name = "Detail"; + // + // table2 + // + this.table2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.table2.Name = "table2"; + this.table2.OddStyleName = "DetailData3_Odd"; + this.table2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.tableRow1}); + this.table2.SizeF = new System.Drawing.SizeF(650F, 25F); + // + // tableRow1 + // + this.tableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.tableCell1, + this.tableCell2}); + this.tableRow1.Name = "tableRow1"; + this.tableRow1.Weight = 1D; + // + // tableCell1 + // + this.tableCell1.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.tableCell1.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Id]")}); + this.tableCell1.Name = "tableCell1"; + this.tableCell1.StyleName = "DetailData1"; + this.tableCell1.StylePriority.UseBorders = false; + this.tableCell1.Text = "Id"; + this.tableCell1.Weight = 0.3D; + // + // tableCell2 + // + this.tableCell2.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] { + new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Name]")}); + this.tableCell2.Name = "tableCell2"; + this.tableCell2.StyleName = "DetailData1"; + this.tableCell2.Text = "Name"; + this.tableCell2.Weight = 0.7D; + // + // sqlDataSource1 + // + this.sqlDataSource1.ConnectionName = "SqlServer"; + this.sqlDataSource1.Name = "sqlDataSource1"; + columnExpression1.ColumnName = "Id"; + table1.Name = "Sas_T_Sector"; + columnExpression1.Table = table1; + column1.Expression = columnExpression1; + columnExpression2.ColumnName = "Name"; + columnExpression2.Table = table1; + column2.Expression = columnExpression2; + selectQuery1.Columns.Add(column1); + selectQuery1.Columns.Add(column2); + selectQuery1.Name = "Sas_T_Sector"; + selectQuery1.Tables.Add(table1); + this.sqlDataSource1.Queries.AddRange(new DevExpress.DataAccess.Sql.SqlQuery[] { + selectQuery1}); + this.sqlDataSource1.ResultSchemaSerializable = resources.GetString("sqlDataSource1.ResultSchemaSerializable"); + // + // Title + // + this.Title.BackColor = System.Drawing.Color.Transparent; + this.Title.BorderColor = System.Drawing.Color.Black; + this.Title.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.Title.BorderWidth = 1F; + this.Title.Font = new DevExpress.Drawing.DXFont("Arial", 14.25F); + this.Title.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(70)))), ((int)(((byte)(80))))); + this.Title.Name = "Title"; + this.Title.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F); + // + // DetailCaption1 + // + this.DetailCaption1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(181)))), ((int)(((byte)(211)))), ((int)(((byte)(142))))); + this.DetailCaption1.BorderColor = System.Drawing.Color.White; + this.DetailCaption1.Borders = DevExpress.XtraPrinting.BorderSide.Left; + this.DetailCaption1.BorderWidth = 2F; + this.DetailCaption1.Font = new DevExpress.Drawing.DXFont("Arial", 8.25F, DevExpress.Drawing.DXFontStyle.Bold); + this.DetailCaption1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(70)))), ((int)(((byte)(80))))); + this.DetailCaption1.Name = "DetailCaption1"; + this.DetailCaption1.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F); + this.DetailCaption1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // + // DetailData1 + // + this.DetailData1.BorderColor = System.Drawing.Color.Transparent; + this.DetailData1.Borders = DevExpress.XtraPrinting.BorderSide.Left; + this.DetailData1.BorderWidth = 2F; + this.DetailData1.Font = new DevExpress.Drawing.DXFont("Arial", 8.25F); + this.DetailData1.ForeColor = System.Drawing.Color.Black; + this.DetailData1.Name = "DetailData1"; + this.DetailData1.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F); + this.DetailData1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // + // DetailData3_Odd + // + this.DetailData3_Odd.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(245)))), ((int)(((byte)(248))))); + this.DetailData3_Odd.BorderColor = System.Drawing.Color.Transparent; + this.DetailData3_Odd.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.DetailData3_Odd.BorderWidth = 1F; + this.DetailData3_Odd.Font = new DevExpress.Drawing.DXFont("Arial", 8.25F); + this.DetailData3_Odd.ForeColor = System.Drawing.Color.Black; + this.DetailData3_Odd.Name = "DetailData3_Odd"; + this.DetailData3_Odd.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F); + this.DetailData3_Odd.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // + // PageInfo + // + this.PageInfo.Font = new DevExpress.Drawing.DXFont("Arial", 8.25F, DevExpress.Drawing.DXFontStyle.Bold); + this.PageInfo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(70)))), ((int)(((byte)(80))))); + this.PageInfo.Name = "PageInfo"; + this.PageInfo.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F); + // + // TestReport + // + this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.TopMargin, + this.BottomMargin, + this.ReportHeader, + this.Detail}); + this.ComponentStorage.AddRange(new System.ComponentModel.IComponent[] { + this.sqlDataSource1}); + this.DataMember = "Sas_T_Sector"; + this.DataSource = this.sqlDataSource1; + this.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F); + this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] { + this.Title, + this.DetailCaption1, + this.DetailData1, + this.DetailData3_Odd, + this.PageInfo}); + this.Version = "22.2"; + ((System.ComponentModel.ISupportInitialize)(this.table2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + + } + + #endregion + + private DevExpress.XtraReports.UI.TopMarginBand TopMargin; + private DevExpress.XtraReports.UI.BottomMarginBand BottomMargin; + private DevExpress.XtraReports.UI.XRPageInfo pageInfo1; + private DevExpress.XtraReports.UI.XRPageInfo pageInfo2; + private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; + private DevExpress.XtraReports.UI.XRLabel label1; + private DevExpress.XtraReports.UI.DetailBand Detail; + private DevExpress.XtraReports.UI.XRTable table2; + private DevExpress.XtraReports.UI.XRTableRow tableRow1; + private DevExpress.XtraReports.UI.XRTableCell tableCell1; + private DevExpress.XtraReports.UI.XRTableCell tableCell2; + private DevExpress.DataAccess.Sql.SqlDataSource sqlDataSource1; + private DevExpress.XtraReports.UI.XRControlStyle Title; + private DevExpress.XtraReports.UI.XRControlStyle DetailCaption1; + private DevExpress.XtraReports.UI.XRControlStyle DetailData1; + private DevExpress.XtraReports.UI.XRControlStyle DetailData3_Odd; + private DevExpress.XtraReports.UI.XRControlStyle PageInfo; + } +} diff --git a/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.cs b/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.cs new file mode 100644 index 00000000..6278b7f7 --- /dev/null +++ b/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.cs @@ -0,0 +1,9 @@ +namespace Erp.Reports.PredefinedReports; + +public partial class TestReport : DevExpress.XtraReports.UI.XtraReport +{ + public TestReport() + { + InitializeComponent(); + } +} diff --git a/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.resx b/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.resx new file mode 100644 index 00000000..e36faffa --- /dev/null +++ b/api/src/Erp.Platform.HttpApi.Host/PredefinedReports/TestReport.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + PERhdGFTZXQgTmFtZT0ic3FsRGF0YVNvdXJjZTEiPjxWaWV3IE5hbWU9IkNhdGVnb3JpZXMiPjxGaWVsZCBOYW1lPSJDYXRlZ29yeUlEIiBUeXBlPSJJbnQ2NCIgLz48RmllbGQgTmFtZT0iQ2F0ZWdvcnlOYW1lIiBUeXBlPSJTdHJpbmciIC8+PEZpZWxkIE5hbWU9IkRlc2NyaXB0aW9uIiBUeXBlPSJTdHJpbmciIC8+PEZpZWxkIE5hbWU9IlBpY3R1cmUiIFR5cGU9IkJ5dGVBcnJheSIgLz48RmllbGQgTmFtZT0iSWNvbjE3IiBUeXBlPSJCeXRlQXJyYXkiIC8+PEZpZWxkIE5hbWU9Ikljb24yNSIgVHlwZT0iQnl0ZUFycmF5IiAvPjwvVmlldz48L0RhdGFTZXQ+ + + \ No newline at end of file diff --git a/api/src/Erp.Platform.HttpApi.Host/ReportServices/CustomReportStorageWebExtension.cs b/api/src/Erp.Platform.HttpApi.Host/ReportServices/CustomReportStorageWebExtension.cs index 879dbf7f..50ed4c00 100644 --- a/api/src/Erp.Platform.HttpApi.Host/ReportServices/CustomReportStorageWebExtension.cs +++ b/api/src/Erp.Platform.HttpApi.Host/ReportServices/CustomReportStorageWebExtension.cs @@ -10,7 +10,7 @@ using System.ServiceModel; using DevExpress.XtraReports.UI; public class CustomReportStorageWebExtension : DevExpress.XtraReports.Web.Extensions.ReportStorageWebExtension { - readonly string reportDirectory = "Reports"; + readonly string reportDirectory = "PredefinedReports\\Reports"; const string FileExtension = ".repx"; public CustomReportStorageWebExtension()