From 163817fae4675e12ff789f34ae7e98b8cd34bc2e Mon Sep 17 00:00:00 2001 From: RamyaManickam Date: Thu, 28 Apr 2022 11:16:40 +0530 Subject: [PATCH 1/2] feature(REPORT-10918): Bold-reports 4.1 release changes --- Controllers/PreviewController.cs | 9 +- Controllers/ReportDesignerWebApiController.cs | 27 +++--- Controllers/ReportViewerWebApiController.cs | 8 ++ Models/SqlQuery.cs | 38 ++++++++ NuGet.config | 1 + ReportsCoreSamples.csproj | 13 +-- Startup.cs | 2 + Views/DynamicChartSeries/Index.cshtml | 2 +- Views/RDLC/Index.cshtml | 9 +- Views/ReportDesigner/Index.cshtml | 11 ++- Views/ReportWriter/Index.cshtml | 4 +- appsettings.json | 4 +- bundleconfig.json | 5 +- web.config | 9 ++ wwwroot/assets/sidebar/landscape.png | Bin 686412 -> 799370 bytes wwwroot/assets/sidebar/portrait.png | Bin 1383456 -> 1508398 bytes .../bold.reportdesigner.core.material.min.css | 6 +- .../bold.widgets.core.material.min.css | 4 +- ...reportdesigner.theme.compatibility.min.css | 4 +- .../bold.reportdesigner.theme.min.css | 4 +- .../material/bold.theme.compatibility.min.css | 4 +- .../bold-reports/material/bold.theme.min.css | 4 +- .../material/images/slider-tick.png | Bin 156 -> 156 bytes wwwroot/css/common/common.css | 39 +++++++++ wwwroot/css/common/sidebar.css | 4 +- wwwroot/css/common/writer.css | 4 +- .../Report/consolidated-balance-sheet.rdlc | 2 +- wwwroot/resources/Report/paystub.rdlc | 2 +- .../resources/Report/product-line-sales.rdl | 44 +++++----- .../resources/Report/sales-order-detail.rdl | 2 +- wwwroot/samples.json | 81 +++++++++++++++++- .../bold-reports/bold.report-designer.min.js | 6 +- .../bold-reports/bold.report-viewer.min.js | 6 +- .../bold.report-designer-widgets.min.js | 4 +- .../common/bold.reports.common.min.js | 6 +- .../common/bold.reports.react.min.js | 4 +- .../common/bold.reports.widgets.min.js | 4 +- .../bold-reports/common/ej.unobtrusive.min.js | 4 +- .../bold-reports/common/ej.webform.min.js | 4 +- .../common/ej.widget.angular.min.js | 4 +- .../bold-reports/common/ej.widget.ko.min.js | 4 +- .../bold-reports/common/ej2-base.min.js | 4 +- .../bold-reports/common/ej2-data.min.js | 4 +- .../bold-reports/common/ej2-pdf-export.min.js | 4 +- .../bold-reports/common/ej2-svg-base.min.js | 4 +- .../data-visualization/ej.bulletgraph.min.js | 6 +- .../data-visualization/ej.chart.min.js | 6 +- wwwroot/scripts/common/global.js | 4 +- wwwroot/scripts/common/header.js | 4 +- wwwroot/scripts/common/preview.js | 18 ++++ wwwroot/scripts/common/rdlcData.js | 28 +++++- wwwroot/scripts/dependent/jquery.min.js | 4 +- 52 files changed, 362 insertions(+), 116 deletions(-) diff --git a/Controllers/PreviewController.cs b/Controllers/PreviewController.cs index 08f8a90..89f0120 100644 --- a/Controllers/PreviewController.cs +++ b/Controllers/PreviewController.cs @@ -6,12 +6,17 @@ namespace ReportsCoreSamples.Controllers { - public class PreviewController: MetaData + public class PreviewController : MetaData { public IActionResult Preview() { - string foderName = this.ControllerContext.RouteData.Values["controller"].ToString(); + string foderName = this.ControllerContext.RouteData.Values["controller"].ToString(); ViewBag.action = "Preview"; + if (foderName == "ExternalParameterReport") + { + ViewBag.parameterSettings = new BoldReports.Models.ReportViewer.ParameterSettings(); + ViewBag.parameterSettings.HideParameterBlock = true; + } this.updateMetaData(); return View("~/Views/" + foderName + "/Index.cshtml"); } diff --git a/Controllers/ReportDesignerWebApiController.cs b/Controllers/ReportDesignerWebApiController.cs index 7990c7e..62404ea 100644 --- a/Controllers/ReportDesignerWebApiController.cs +++ b/Controllers/ReportDesignerWebApiController.cs @@ -174,20 +174,13 @@ public void UploadReportAction() private string GetFilePath(string itemName, string key) { - string targetFolder = this._hostingEnvironment.WebRootPath + "\\"; - targetFolder += "Cache"; - - if (!System.IO.Directory.Exists(targetFolder)) - { - System.IO.Directory.CreateDirectory(targetFolder); - } - - if (!System.IO.Directory.Exists(targetFolder + "\\" + key)) + string dirPath = Path.Combine(this._hostingEnvironment.WebRootPath,"Cache",key); + if (!System.IO.Directory.Exists(dirPath)) { - System.IO.Directory.CreateDirectory(targetFolder + "\\" + key); + System.IO.Directory.CreateDirectory(dirPath); } - return targetFolder + "\\" + key + "\\" + itemName; + return Path.Combine(dirPath, itemName); } public bool SetData(string key, string itemId, ItemInfo itemData, out string errMsg) @@ -238,7 +231,17 @@ public ResourceInfo GetData(string key, string itemId) var resource = new ResourceInfo(); try { - resource.Data = System.IO.File.ReadAllBytes(this.GetFilePath(itemId, key)); + var filePath = this.GetFilePath(itemId, key); + if (itemId.Equals(Path.GetFileName(filePath), StringComparison.InvariantCultureIgnoreCase) && System.IO.File.Exists(filePath)) + { + resource.Data = System.IO.File.ReadAllBytes(filePath); + LogExtension.LogInfo(string.Format("Method Name: {0}; Class Name: {1}; Message: {2};", "GetData", "CacheHelper", string.Format("File data retrieved from the path: {0}", filePath)), null); + } + else + { + resource.ErrorMessage = "File not found from the specified path"; + LogExtension.LogInfo(string.Format("Method Name: {0}; Class Name: {1}; Message: {2};", "GetData", "CacheHelper", string.Format("File not found from the specified path: {0}", filePath)), null); + } } catch (Exception ex) { diff --git a/Controllers/ReportViewerWebApiController.cs b/Controllers/ReportViewerWebApiController.cs index 625d0c9..9a19d95 100644 --- a/Controllers/ReportViewerWebApiController.cs +++ b/Controllers/ReportViewerWebApiController.cs @@ -95,5 +95,13 @@ public void LogError(string errorCode, string message, Exception exception, stri { LogExtension.LogError(message, exception, System.Reflection.MethodBase.GetCurrentMethod(), errorCode + "-" + errorDetail); } + + [HttpGet] + public object GetExternalParameterData() + { + var productCategory = Models.SqlQuery.getProductCategory(this._cache); + var productSubCategory = Models.SqlQuery.getProductSubCategory(this._cache); + return Json(new { ProductCategoryDetail = productCategory, ProductSubCategoryDetail = productSubCategory }); + } } } \ No newline at end of file diff --git a/Models/SqlQuery.cs b/Models/SqlQuery.cs index 532cc50..5c2cf24 100644 --- a/Models/SqlQuery.cs +++ b/Models/SqlQuery.cs @@ -30,5 +30,43 @@ public static string getJson(IMemoryCache _cache) } return null; } + public static string getProductCategory(IMemoryCache _cache) + { + + using (SqlConnection connection = new SqlConnection("Data Source=dataplatformdemodata.syncfusion.com;Initial Catalog=AdventureWorks2016;user id=demoreadonly@data-platform-demo;password=N@c)=Y8s*1&dh;")) + { + connection.Open(); + + string queryString = "SELECT DISTINCT ProductCategoryID, Name FROM Production.ProductCategory"; + SqlDataAdapter adapter = new SqlDataAdapter(queryString, connection); + + using (DataSet ProductCategories = new DataSet()) + { + adapter.Fill(ProductCategories, "Orders"); + _cache.Set("ProductCategoryDetail", ProductCategories.Tables[0]); + connection.Close(); + return JsonConvert.SerializeObject(_cache.Get("ProductCategoryDetail")); + } + } + } + public static string getProductSubCategory(IMemoryCache _cache) + { + + using (SqlConnection connection = new SqlConnection("Data Source=dataplatformdemodata.syncfusion.com;Initial Catalog=AdventureWorks2016;user id=demoreadonly@data-platform-demo;password=N@c)=Y8s*1&dh;")) + { + connection.Open(); + + string queryString = $"SELECT ProductSubcategoryID, ProductCategoryID, Name FROM Production.ProductSubcategory"; + SqlDataAdapter adapter = new SqlDataAdapter(queryString, connection); + + using (DataSet ProductCategories = new DataSet()) + { + adapter.Fill(ProductCategories, "Orders"); + _cache.Set("ProductSubCategoryDetail", ProductCategories.Tables[0]); + connection.Close(); + return JsonConvert.SerializeObject(_cache.Get("ProductSubCategoryDetail")); + } + } + } } } diff --git a/NuGet.config b/NuGet.config index c1dae4d..43ac161 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,6 +3,7 @@ + diff --git a/ReportsCoreSamples.csproj b/ReportsCoreSamples.csproj index ccc328d..1b8a9e8 100644 --- a/ReportsCoreSamples.csproj +++ b/ReportsCoreSamples.csproj @@ -15,12 +15,13 @@ - - - - - - + + + + + + + diff --git a/Startup.cs b/Startup.cs index e3ce884..1383213 100644 --- a/Startup.cs +++ b/Startup.cs @@ -152,6 +152,8 @@ public void Configure(IApplicationBuilder app) routes.MapRoute( name: "default", template: "{controller=Main}/{action=Index}/{id?}"); + routes.MapRoute("NotFound", "{*url}", + new { controller = "main", action = "index" }); }); #else app.UseRouting(); diff --git a/Views/DynamicChartSeries/Index.cshtml b/Views/DynamicChartSeries/Index.cshtml index f3a2988..4f328fb 100644 --- a/Views/DynamicChartSeries/Index.cshtml +++ b/Views/DynamicChartSeries/Index.cshtml @@ -17,7 +17,7 @@ @section description {

- This demo shows the VisitorsCount, PurchaserCount, AddedToCartCount by dynamically chossing the chart series. + This demo shows the VisitorsCount, PurchaserCount, AddedToCartCount by dynamically choosing the chart series.

More information about the Chart report item can be found in this + @{ + List extensions = new List(){ + new BoldReports.Models.ReportDesigner.ReportItemExtensionsModule{Name="barcode",ClassName="EJBarcode",ImageClass="customitem-barcode",DisplayName="1D Barcode",Category="Barcodes"}, + new BoldReports.Models.ReportDesigner.ReportItemExtensionsModule{Name="matrixbarcode",ClassName="EJQRBarcode",ImageClass="customitem-qrbarcode",DisplayName="2D Barcode",Category="Barcodes"} + }; + } + + +} + +@section description { +

+} diff --git a/Views/DynamicColumns/Index.cshtml b/Views/DynamicColumns/Index.cshtml new file mode 100644 index 0000000..49eff6d --- /dev/null +++ b/Views/DynamicColumns/Index.cshtml @@ -0,0 +1,26 @@ +@inject Globals globals; + +@section control { + + + +} + +@section description { +
+

+ Dynamic column tabular report demonstrates to change the number of columns at runtime using ASP.NET Core Bold Report Viewer. +

+
    +
  • + Dynamic column is a feature that allows one to store different sets of columns for each row in a table. +
  • + In this table few columns are static and few can be varied, based on the column names selected in the parameter. This feature is achieved by changing the column visibility based on the parameter selected. +
  • +
+

+ More information about the Tablix data region can be found in this documentation section. +

+
+} diff --git a/Views/ExternalParameterReport/Index.cshtml b/Views/ExternalParameterReport/Index.cshtml new file mode 100644 index 0000000..1657db0 --- /dev/null +++ b/Views/ExternalParameterReport/Index.cshtml @@ -0,0 +1,159 @@ +@inject Globals globals; + +@section control { +
+
+
+ + + +
+
+
Parameters
+
+
Category
+
+ +
+
+
+
+ Sub Category +
+
+ +
+
+
+
+ Start Date +
+
+ +
+
+
+
+ End Date +
+
+ +
+
+ +
+
+
+ + +} +@section description { +
+

+ The Product Line Sales RDL report represents the best performing sales people and stores using Tablix and Chart + report items. +

+
    +
  • + The sales details are organized by category and sub-category of products using the concept of external + report parameters which is designed using ejdropdownlist. It allows users to filter Sub Category based on the selected + Category. +
  • +
  • Non cascading parameters namely start date and end date also used in this report.
  • +
+

+ More information about handling the report items can be found in this documentation section. +

+
+} diff --git a/Views/ProductDetails/index.cshtml b/Views/ProductDetails/index.cshtml new file mode 100644 index 0000000..fb7d60b --- /dev/null +++ b/Views/ProductDetails/index.cshtml @@ -0,0 +1,30 @@ +@inject Globals globals; + +@section control { + + + +} + +@section description { +
+

+ The Product Details report lists the details defined for each product in database using the RDL table report item. +

+
    +
  • Custom barcode report item is placed in a table cell to display the ProductId.
  • +
  • + The total price value of each product is calculated based on the OrderQty and UnitPrice data fields using expression. +
  • +
  • + The price values in the product details are formatted in the Currency format to improve the readability of data. +
  • +
+

+ More information about the Tablix data region can be found in this documentation section. +

+
+} diff --git a/Views/SparkLine/Index.cshtml b/Views/SparkLine/Index.cshtml new file mode 100644 index 0000000..168d634 --- /dev/null +++ b/Views/SparkLine/Index.cshtml @@ -0,0 +1,31 @@ +@inject Globals globals; + +@section control { + + + + + +} + +@section description { +
+

+ A sparkline is a small embedded line graph that illustrates a single trend. In this report, sales data are + interpreted to visualize the sales trends using Spark Line report items. +

+

+ More information about RDLC report can be found in this documentation + section. +

+
+} diff --git a/wwwroot/extensions/barcode.css b/wwwroot/extensions/barcode.css new file mode 100644 index 0000000..9fea938 --- /dev/null +++ b/wwwroot/extensions/barcode.css @@ -0,0 +1,47 @@ +.customitem-barcode { + background-image: url('images/barcode.png'); +} + +.customitem-qrbarcode { + background-image: url('images/qrbarcode.png'); +} + +.customitem-barcode, +.customitem-qrbarcode { + background-position: 50% 50%; + background-repeat: no-repeat; + height: 25px; +} + +.e-rptdesigner-itempanel-dragelements .customitem-barcode, +.e-rptdesigner-itempanel-dragelements .customitem-qrbarcode { + margin-top: 0px !important; + height: 100%; +} + +.e-rptdesigner-loaderDiv .e-rptdesigner-spinnerDiv { + box-sizing: content-box !important; + -moz-box-sizing: content-box !important; + -webkit-box-sizing: content-box !important; +} + +/* Safari */ +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + } +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} diff --git a/wwwroot/extensions/images/barcode.png b/wwwroot/extensions/images/barcode.png new file mode 100644 index 0000000000000000000000000000000000000000..66af8b4b0d7ae24d884003612464b42eecf05065 GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^azHG}!3HGNOy@}fDaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9E$svykh8Km+7DA?)g;uzxLog7p2@_)Tv7@NThn?nZzvd$hj zaFFMrwU&{A&TgJW?qWlOEix$y5t2*~i3+yp!WCRilZgWi^VSU_C)!Z8)O;YJ%A!`Nhd9V afuZ)7=vJHFaz&t{7(8A5T-G@yGywo4(ol;4 literal 0 HcmV?d00001 diff --git a/wwwroot/extensions/images/qrbarcode.png b/wwwroot/extensions/images/qrbarcode.png new file mode 100644 index 0000000000000000000000000000000000000000..0d191daccef5cef3ad33d547ad2a4214559a0fea GIT binary patch literal 1708 zcmV;d22=ToP)X1^@s6CN-WK00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGqB>(^xB>_oNB=7(L00Cl4M?_W%4e5yh z00uNkL_t(YOT|`sY}92CeS7!VZchr7OYVXvha3`+0D_GokZ@=ahzg=Y zRN?^z1q2Cb5D-ygg0xBysGLPWkXvq$Zp*gat9$!qb{Dn;{xBx`Hk<5zzweuw@6DT; zpCLxze}Fpv@_-L(Dt%~@X@tR$ctV7uzC^0@y4DeDPGS?si!%M35pd-zQZY`|XaW;ShSHk$}pkLQ3FNF}{W;yF_V5CH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vff+Qz0 zH>JhNSA-@5B4uwQv}0|G(IHE#G5FJJJhaG(q06eN^f(h64*SuYE%uZ%q*Wj@`;9?% zeI{rmU74G5JGreyD8bwbE6K*v(b?J-kNg$Vc`TzaSq-gnOc>DC3KO;P!FCT`+E|N~ zdwu#$pj6BFlg={t(JakH@||lyJ1gGW!iOpN=6657KiYsScB%S6RQCy_ze}*MaU_a8 zdGioO%P73Y`7ELo+exUZ + + + + + + + + + + 15.00001pt + 135.0001pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 37.50003pt + 60.00005pt + 199.5002pt + + + BarcodeValue + 01234567 + + + BarcodeType + Code128A + + + DisplayBarcodeText + true + + + + + + barcode + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + Code128A + + + + + + + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 232.5002pt + 135.0001pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 37.50003pt + 60.00005pt + 199.5002pt + + + BarcodeValue + 01234567 + + + BarcodeType + Code128B + + + DisplayBarcodeText + true + + + + + + barcode + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + Code128B + + + + + + + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 450.0004pt + 135.0001pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + Code128C + + + + + + + + + 1.5pt + 37.50003pt + 60.00005pt + 199.5002pt + + + BarcodeValue + 0123456789 + + + BarcodeType + Code128C + + + DisplayBarcodeText + true + + + + + + barcode + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 232.5002pt + 390.0003pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 37.50003pt + 60.00005pt + 199.5002pt + + + BarcodeValue + 001234567895 + + + BarcodeType + UpcBarcode + + + DisplayBarcodeText + true + + + + + + barcode + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + UPCA + + + + + + + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 232.5002pt + 7.50001pt + 112.5001pt + 202.5002pt + + + + + + 60.00007pt + 26.25002pt + 82.50007pt + 82.50007pt + + + BarcodeValue + 012345673 + + + BarcodeType + qrbarcode + + + DisplayBarcodeText + true + + + + + + matrixbarcode + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + QR Code + + + + + + + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 450.0004pt + 390.0003pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 37.50003pt + 60.00005pt + 199.5002pt + + + BarcodeValue + 1234567823560 + + + BarcodeType + EAN-13 + + + DisplayBarcodeText + true + + + + + + barcode + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + EAN-13 + + + + + + + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 450.0004pt + 262.5002pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 37.50003pt + 60.00005pt + 199.5002pt + + + BarcodeValue + A123456B + + + BarcodeType + Codabar + + + DisplayBarcodeText + true + + + + + + barcode + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + Codabar + + + + + + + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 15.00001pt + 390.0003pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 37.50003pt + 60.00005pt + 199.5002pt + + + BarcodeValue + 0123456789 + + + BarcodeType + Interleaved 2 of 5 + + + DisplayBarcodeText + true + + + + + + barcode + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + Interleaved 2 of 5 + + + + + + + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 15.00001pt + 7.50001pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + QR Code + + + + + + + + + 60.00005pt + 30.00002pt + 75.00006pt + 75.00006pt + + + BarcodeValue + https://demos.boldreports.com + + + BarcodeType + qrbarcode + + + DisplayBarcodeText + false + + + + + + matrixbarcode + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 232.5002pt + 262.5002pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + Code39 Extended + + + + + + + + + 1.5pt + 37.50003pt + 60.00005pt + 199.5002pt + + + BarcodeValue + 0123456 + + + BarcodeType + Code39Extended + + + DisplayBarcodeText + true + + + + + + barcode + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 450.0004pt + 7.50001pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + Code93 + + + + + + + + + 1.5pt + 37.50003pt + 60.00005pt + 199.5002pt + + + BarcodeValue + 123456789 + + + BarcodeType + Code93 + + + DisplayBarcodeText + true + + + + + + barcode + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 15.00001pt + 262.5002pt + 112.5001pt + 202.5002pt + + + + + + 1.5pt + 37.50003pt + 60.00005pt + 199.5002pt + + + BarcodeValue + 01234567 + + + BarcodeType + Code39 + + + DisplayBarcodeText + true + + + + + + barcode + + + 1.5pt + 0pt + 16.50001pt + 199.5002pt + + + + true + true + + + + + Code39 + + + + + + + + + 15.00001pt + 20.25002pt + 0pt + 172.5001pt + + + + + + true + + + 518.2504pt + + 669pt + + 792pt + 745.5pt + + + + + 37.5pt + true + true + + + 0pt + 0pt + 37.50003pt + 669.0005pt + + + + + + 15pt + 4.875pt + 23.25pt + 120.75pt + + + + true + true + + + + + Barcode Types + + + + + + + + + + 0 + Inch + Px + \ No newline at end of file diff --git a/wwwroot/resources/Report/data-bar.rdl b/wwwroot/resources/Report/data-bar.rdl new file mode 100644 index 0000000..f7df0c0 --- /dev/null +++ b/wwwroot/resources/Report/data-bar.rdl @@ -0,0 +1,947 @@ + + + + + + + + + + + 0.11458in + 0.05549in + 0.71360in + 10.22017in + + + + Sales + + + + 1.19141in + + + 1.19141in + + + 1.39147in + + + 6.44219in + + + + + 0.32498in + + + + + 0in + 0in + 0.32498in + 1.19141in + + + + true + true + + + + + Year + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 0.32498in + 1.19141in + + + + true + true + + + + + Category + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 0.32498in + 1.39147in + + + + true + true + + + + + Sales + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 0.32498in + 6.4422in + + + + true + true + + + + + Sales Indicator + + + + + + + + 1 + 1 + + + + + + 0.38330in + + + + + 0in + 0in + 0.38330in + 1.19141in + + + + true + true + + + + + =Fields!OrderYear.Value + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 0.38330in + 1.19141in + + + + true + true + + + + + =Fields!SubCat.Value + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 0.38330in + 1.39147in + + + + true + true + + + + + =Fields!Sales.Value + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 0.38330in + 6.4422in + + + + Sales + + + + + + + + + + + + + =Fields!OrderQtr.Value + + + + + =Fields!OrderQtr.Value + + + + + + + + + + + + + =Sum(Fields!Sales.Value) + + + + true + true + Right + + + + + + + + + + + False + + False + + + + Default + Default + + + + + + Default + Default + + + + + + 0 + Default + Default + + + + + + 0.5 + Default + Default + + null + Default + + false + Ragged + 0 + Auto + + + + + + + + False + + False + + + + Default + Default + + + + + + Default + Default + + + + + + 0 + Default + Default + + + + + + 0.5 + Default + Default + + null + Opposite + + false + Ragged + 0 + Auto + + + + + + + + + + + + Default + Default + + + + + + Default + Default + + + + + + 0 + Default + Default + + + + + + 0.5 + Default + Default + + null + Default + 0 + =Max(Fields!Sales.Value, "Tablix1") + + false + Ragged + 0 + Auto + + + + + + + + + + + + Default + Default + + + + + + Default + Default + + + + + + 0 + Default + Default + + + + + + 0.5 + Default + Default + + null + Opposite + + false + Ragged + 0 + Auto + + + + No Data Available + false + + TopCenter + 0 + Auto + + DataBar + + 1 + 1 + + + + + + + + + + + + + + + + + + After + + + + + + + + + 431.25pt + + 750.285pt + + 612pt + 792pt + + + + + 0.52083in + true + true + + + 0pt + 0pt + 37.5pt + 750.285pt + + + + + + 7.5pt + 7.5pt + 22.5pt + 292.035pt + + + + true + true + + + + + Data Bar + + + + + + + + + true + + + + + + + + 0.72917in + true + true + + 18pt + 18pt + 18pt + 18pt + + + + + + 7.5pt + 30pt + 49.25781pt + 823.5pt + + + + + WebsiteAnalysis + + + + 102.7441pt + + + 98.24219pt + + + 82.5pt + + + 107.2461pt + + + 95.24414pt + + + 95.99609pt + + + 97.5pt + + + 71.99219pt + + + 72.03125pt + + + + + 24.36525pt + + + + + 0in + 0in + 24.36525pt + 102.744pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + Product + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.36525pt + 98.2425pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + Referrer + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.36525pt + 82.5pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + Visitors Count + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.36525pt + 107.2462pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + Added To Cart Count + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.36525pt + 95.244pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + Purchaser Count + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.36525pt + 95.99625pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + Date + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.36525pt + 97.5pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + Category + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.36525pt + 71.9922pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + Sub Category + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.36525pt + 72.03127pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + Device Type + + + + + + + + 1 + 1 + + + + + + 24.89257pt + + + + + 0in + 0in + 24.89257pt + 102.744pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + =Fields!Product.Value + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.89257pt + 98.2425pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + =Fields!Referrer.Value + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.89257pt + 82.5pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + =Sum(Fields!VisitorsCount.Value) + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.89257pt + 107.2462pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + =Sum(Fields!AddedToCartCount.Value) + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.89257pt + 95.244pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + =Sum(Fields!PurchaserCount.Value) + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.89257pt + 95.99625pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + =Fields!Date.Value + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.89257pt + 97.5pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + =Fields!Category.Value + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.89257pt + 71.9922pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + =Fields!SubCategory.Value + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 24.89257pt + 72.03127pt + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + true + true + + + + + =Fields!DeviceType.Value + + + + + + + + 1 + 1 + + + + + + + + + + + + + + + + =IIf(Join(Parameters!TableColumn.Value,", ").Contains("1"),false,true) + + + + + =IIf(Join(Parameters!TableColumn.Value,", ").Contains("2"),false,true) + + + + + =IIf(Join(Parameters!TableColumn.Value,", ").Contains("3"),false,true) + + + + + =IIf(Join(Parameters!TableColumn.Value,", ").Contains("4"),false,true) + + + + + + + + After + true + + + + + =Fields!Product.Value + =Fields!Referrer.Value + + + + + + true + + + 7.5pt + 0pt + 22.5pt + 332.25pt + + + + true + true + + + + + Product conversion + + + + details + + + + + + + 44.25pt + true + true + + + 0pt + 0pt + 37.4375pt + 836.25pt + + + + + + 0pt + 5.76pt + 23.04002pt + 271.4402pt + + + + true + true + + + + + Dynamic Columns + + + + + + + + + + + + + true + + + + + + + + 7.5pt + true + true + + 2.25pt + 2.25pt + 2.25pt + 2.25pt + + + + + + + 0 + + + + SQL + Data Source=dataplatformdemodata.syncfusion.com;Initial Catalog=SampleDB;user id=demoreadonly@data-platform-demo;password=N@c)=Y8s*1&dh + + false + + + + + + + Date + System.DateTime + + + Category + System.String + + + SubCategory + System.String + + + Product + System.String + + + VisitorsCount + System.Double + + + PurchaserCount + System.Double + + + AddedToCartCount + System.Double + + + Referrer + System.String + + + DeviceType + System.String + + + + ReportSampleDatabase + Text + + SELECT [dbo].[WebsiteVisitorAnalysisTable20151029210625356].[Date], + [dbo].[WebsiteVisitorAnalysisTable20151029210625356].[Category], + [dbo].[WebsiteVisitorAnalysisTable20151029210625356].[SubCategory], + [dbo].[WebsiteVisitorAnalysisTable20151029210625356].[Product], + [dbo].[WebsiteVisitorAnalysisTable20151029210625356].[VisitorsCount], + [dbo].[WebsiteVisitorAnalysisTable20151029210625356].[PurchaserCount], + [dbo].[WebsiteVisitorAnalysisTable20151029210625356].[AddedToCartCount], + [dbo].[WebsiteVisitorAnalysisTable20151029210625356].[Referrer], + [dbo].[WebsiteVisitorAnalysisTable20151029210625356].[DeviceType] FROM [dbo].[WebsiteVisitorAnalysisTable20151029210625356] + + + + + + + String + + + 1 + 2 + 3 + 4 + + + Table Column: + + + + 1 + + + + 2 + + + + 3 + + + + 4 + + + + + true + + + + + image/png + iVBORw0KGgoAAAANSUhEUgAAAU4AAABLCAYAAAAf6W5uAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAXEQAAFxEByibzPwAADBhJREFUeF7tnQ2R3DgQhQMhEAIhEAIhEA5CIIRBIARCIByEQDgIgZB7b93eGttSq/U3M/a8r0pVO3JbkrulZ1uyvR+EEEKIDX///v1kfwohhCgB0fyG9Afps2UJIYTIAbH8B+mWf2yTEEKIPRDJz0i80tzz3UyEEEKsQBw/IaVEc+WnmQohhIAofkT6/SaPPrT5aLsJIcTrAjH89SaLMf5D0qKREOJ1gQj+fJPDOnhL/8WKEEKI1wHit19Br0Ur7kKINiggSN870rsA4e8vu23VyYpygd1XpBH8sCKFECIOxOPfRUOa+deKYlkUvy6sq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EE7GxVuh7iEVl5nCyf516IPIqxZOgm2j41gaIx4h0TPbHKEyRgRJwhmD82DZDrECG3bEGYM0NUAfJpwE2ylIo0QiF+tu4SSwHdnWW1JxmVEPocB1v6u+B9tH+aY4RhazLCHRM9scoTJGBEnCmYcdlbffsWDcgH04gT5SQFMD9KHCuQI7xoODpodcrL3+HRbOFewTWXipIRWXkeWvsMwhX0fKATsupLX0WdYdGiOLeZa7lcFC2BHY+VvT+0IH/uYASNmEkxXFsvh4T9KmIiU7CvN3dqMT/TDkkRqUw7M5y+P/U0nVdZs8UgPUi1e0E3aXcQv3QeIATJXnpVysvf5d3b4V7FsTFy8d2o283jF5m9i+yCNTXp2hFzBWYM+7JtbLk2FKkJnHbbTJinkK2Kfat6ZQWYn9blNVe8QFQNA9mkVCCCEuCYVx0ccsxflVIYR4GSCKnHrw5pbi//ZUCCHOAsStdd41sqhS/akvIYR4eiBupVvtHoa9+y2EEE8DxG2WcIb/x7UQQpwKCNwM4XTfwhBCiFMDgRstnPxMnURTCHFdIHK9wsl3kPlgcfVDxUKIEh8+/A8w+LmiiDgnCAAAAABJRU5ErkJggg== + + + Inch + Px + \ No newline at end of file diff --git a/wwwroot/resources/Report/product-details.rdl b/wwwroot/resources/Report/product-details.rdl new file mode 100644 index 0000000..00deda2 --- /dev/null +++ b/wwwroot/resources/Report/product-details.rdl @@ -0,0 +1,642 @@ + + + + + + + + + + + 9.75pt + 8.25pt + 99pt + 454.5pt + + + + OrderDetails + + + + 116.9705pt + + + 155.2372pt + + + 53.2118pt + + + 65.23437pt + + + 63.83101pt + + + + + 17.9832pt + + + + + 0in + 0in + 17.9832pt + 116.9707pt + + + + true + + + + + Product Name + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 17.9832pt + 155.2372pt + + + + true + + + + + Product ID + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 17.9832pt + 53.21183pt + + + + true + + + + + Qty + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 17.9832pt + 65.2344pt + + + + true + + + + + Unit Price + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 17.9832pt + 63.831pt + + + + true + + + + + Total Price + + + + + + + + 1 + 1 + + + + + + 81.00375pt + + + + + 0in + 0in + 81.00375pt + 116.9707pt + + + + #d3d3d3 + =1.333 + + + #d3d3d3 + =1.333 + + + #d3d3d3 + =1.333 + + + #d3d3d3 + =1.333 + + + true + + + + + =Fields!ProductName.Value + + + + + + + #d3d3d3 + =1.333 + + + #d3d3d3 + =1.333 + + + #d3d3d3 + =1.333 + + + #d3d3d3 + =1.333 + + + + + 12pt + 12.75pt + 54.75pt + 130.5pt + + + BarcodeValue + =(Fields!ProductID.Value) + + + BarcodeType + Code39 + + + DisplayBarcodeText + true + + + + + + barcode + + + true + + 1 + 1 + + + + + + 0in + 0in + 81.00375pt + 53.21183pt + + + + true + + + + + =Fields!Quantity.Value + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 81.00375pt + 65.2344pt + + + + true + + + + + =FormatCurrency(FormatNumber(Fields!UnitPrice.Value,2)) + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 81.00375pt + 63.831pt + + + + true + + + + + =FormatCurrency(FormatNumber(Fields!Quantity.Value * Fields!UnitPrice.Value,2)) + + + + + + + + 1 + 1 + + + + + + + + + + + + + + + + + + + After + + + + + + + + + 111.75pt + + 473.25pt + + 1224pt + 617.25pt + + + + + 37.5pt + true + true + + + 0pt + 0pt + 36.75pt + 474pt + + + + + + 0.75000pt + 5.25pt + 25.5pt + 154.5pt + + + + true + true + + + + + Product Details + + + + + + + + + true + + + + + + + + 0.72917in + true + true + + 1in + 1in + 1in + 1in + + + + + + + 0 + + + + SQL + Data Source=dataplatformdemodata.syncfusion.com;Initial Catalog=Northwind;User ID=demoreadonly@data-platform-demo;Password=N@c)=Y8s*1&dh + true + + false + + + + + + + ProductID + System.Int32 + + + ProductName + System.String + + + Quantity + System.Int16 + + + UnitPrice + System.Decimal + + + Discount + System.Single + + + + NorthWindIO + Text + SELECT TOP 100 [Order Details].ProductID, Products.ProductName, [Order Details].Quantity, [Order Details].UnitPrice, [Order Details].Discount +FROM [Order Details] INNER JOIN + Products ON [Order Details].ProductID = Products.ProductID + + + + Inch + Px + \ No newline at end of file diff --git a/wwwroot/resources/Report/spark-line.rdlc b/wwwroot/resources/Report/spark-line.rdlc new file mode 100644 index 0000000..3f406a4 --- /dev/null +++ b/wwwroot/resources/Report/spark-line.rdlc @@ -0,0 +1,1285 @@ + + + + + + + + + + + 0.12473in + 0.13480in + 1.38544in + 6.527in + + + + SparkLine + + + + + + + 0in + 0in + 0.27051in + 0.52718in + + + + true + true + + + + + Year + + + + + + + + 1 + 1 + + + + + + + + + 0.89551in + + + 1.49967in + + + 3.60449in + + + + + 1.09375in + + + + + 0in + 0in + 1.09375in + 0.89551in + + + + + true + true + + + + + =Sum(Fields!SalesAmount.Value) + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 1.09375in + 1.49968in + + + + + true + true + + + + + =Sum(Fields!SalesAmount.Value) + + + + + + + + 1 + 1 + + + + + + 0in + 0in + 1.09375in + 3.60449in + + + + + + SparkLine + + + + + + + + + + + + + =Fields!Vehicles.Value + + + + + =Fields!Vehicles.Value + + + + + + + + + + + + + =SUM(Fields!SalesAmount.Value) + + + + + + true + false + Auto + + ="Vehicles: "+Fields!Vehicles.Value+ "<br>"+"Sales Amount : "+FormatCurrency(SUM(Fields!SalesAmount.Value)) + + + + + Circle + 0.07300in + + + + + + + Line + + + + + 6pt + + + + + Primary + Primary + + + + + + + + False + + + + + + Center + + + + + 0 + + Auto + + + + Default + Default + + + Auto + + + + Default + Default + + + False + Outside + + + + 1.5 + Default + Default + + + False + Outside + + + + 1 + Default + Default + + Default + Transparent + True + + false + Ragged + 25 + 2 + 0 + Auto + + + + + + + Auto + + + + + + Center + + + + + 0 + + Auto + + + + Default + Default + + + Auto + + + + Default + Default + + + False + Outside + + + + 1.5 + Default + Default + + + False + Outside + + + + 1 + Default + Default + + Opposite + Transparent + True + + false + Ragged + 25 + 2 + 0 + Auto + + + + + + + + + False + + + + + + Center + + + + + 0 + + Auto + + + + Default + Default + + + Auto + + + + Default + Default + + + False + Outside + + + + 1.5 + Default + Default + + + False + Outside + + + + 1 + Default + Default + + Default + Transparent + True + + false + Ragged + 25 + 2 + 0 + Auto + + + + + + + Auto + + + + + + Center + + + + + 0 + + Auto + + + + Default + Default + + + Auto + + + + Default + Default + + + False + Outside + + + + 1.5 + Default + Default + + + False + Outside + + + + 1 + Default + Default + + Opposite + Transparent + True + + false + Ragged + 25 + 2 + 0 + Auto + + + + + + + + + + + + + + BrightPastel + + + + + + + + false + + + + TopCenter + 0 + Auto + + Sparkline + + 1 + 1 + + + + + + + + + + + + =Fields!Region.Value + + + + + =Fields!Region.Value + + + + + + + =Fields!Vehicles.Value + + + + + =Fields!Vehicles.Value + + + + + + 0.27051in + + + 0in + 0in + 0.27051in + 0.89551in + + + + true + true + + + + + =Fields!Vehicles.Value + + + + + + + + + + + + + + + + + + 0.27051in + + + 0in + 0in + 0.27051in + 1.49968in + + + + true + true + + + + + SalesAmount + + + + + + + + + + + + + 0.27051in + + + 0in + 0in + 0.27051in + 3.60449in + + + + true + true + + + + + SalesAmount Trends + + + + + + + + + + + + + + + + + + + + =Fields!Year.Value + + + + + =Fields!Year.Value + + + + 0.52718in + + + 0in + 0in + 1.09375in + 0.52718in + + + + + true + true + + + + + =Fields!Year.Value + + + + + + + + + + + + + + + + + + 6in + + 9.43744in + + 595.44pt + 841.68pt + + + + + 37.5pt + true + true + + + 0pt + 0pt + 37.5pt + 679.5pt + + + + + + 6pt + 7.5pt + 23.25pt + 193.5pt + + + + true + true + + + + + Spark Line + + + + + + + 9.75025pt + true + true + + 78.75pt + 78.75pt + 30pt + 30pt + 36pt + + + + + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + false + + + + + + + Region + System.String + + + Vehicles + System.String + + + Year + System.Int32 + + + SalesAmount + System.String + + + + masterDataSet + Text + /* Local Query */ + + + masterDataSet + D:\development\version-update\reports-aspnet-mvc-samples\masterDataSet.xsd + Fill + GetData + SalesByYearTableAdapter + SalesByYear + + + + + + 4 + 2 + + + true + Inch + \ No newline at end of file diff --git a/wwwroot/scripts/extensions/barcode.js b/wwwroot/scripts/extensions/barcode.js new file mode 100644 index 0000000..a5f3ae7 --- /dev/null +++ b/wwwroot/scripts/extensions/barcode.js @@ -0,0 +1,274 @@ +var EJBarcode = (function () { + function EJBarcode(rptDesigner) { + this.customJSON = null; + this.rootElement = null; + this.customItemDiv = null; + this.reportDesigner = null; + this.loaderDiv = null; + this.errMsgDiv = null; + this.reportDesigner = rptDesigner; + } + EJBarcode.prototype.initializeItem = function (args) { + args.isBuildInService = true; + args.defaultHeight = 120; + args.defaultWidth = 180; + args.minimumHeight = 15; + args.minimumWidth = 90; + args.renderCallback = $.proxy(this.renderData, this); + args.loadingCallback = $.proxy(this.showIndicator, this); + }; + EJBarcode.prototype.renderItem = function (customJson, target) { + this.customJSON = customJson; + this.rootElement = target; + this.renderBarcode(); + }; + EJBarcode.prototype.renderBarcode = function () { + this.customItemDiv = ej.buildTag('div.customitem', '', { + 'width': '100%', + 'height': '100%', + 'border': '1pt dotted gray', + 'box-sizing': 'border-box', + '-moz-box-sizing': 'border-box', + '-webkit-box-sizing': 'border-box', + 'overflow': 'hidden', 'position': 'absolute' + }, { + 'id': this.customJSON.Name + '_customItem' + }); + var loaderDiv = this.loaderDiv = ej.buildTag('div.e-rptdesigner-loaderDiv', '', { + 'width': '100%', 'height': '100%', 'display': 'none', 'opacity': '0.9', + 'position': 'absolute', 'border': '0.5px dotted black', + 'background-color': 'white', + 'z-index': '4000', 'overflow': 'hidden' + }); + var spinnerDiv = ej.buildTag('div.e-rptdesigner-spinnerDiv', '', { + 'border': '5px solid #f3f3f3', + 'border-radius': '50%', 'margin': '-17.5px 0 0 -17.5px', + 'border-top': '5px solid #3498db', + '-webkit-animation': 'spin 2s linear infinite', + 'animation': 'spin 2s linear infinite', + 'background': 'transparent', + 'position': 'absolute', + 'left': '50%', + 'top': '50%', + 'cursor': 'default', + 'height': '25px', + 'width': '25px' + }); + var errorRootDiv = this.errMsgDiv = ej.buildTag('div', '', { + 'display': 'none', 'position': 'relative', 'z-index': '3000', + 'font-family': 'Segoe UI', 'font-size': '13px', 'height': '100%', 'width': '100%' + }); + var errorDiv = ej.buildTag('div', 'Failed to load barcode', { + 'display': 'table-cell', 'overflow': 'hidden', 'font-family': 'Segoe UI', + 'font-size': '13px', 'vertical-align': 'middle', 'text-align': 'center' + }); + this.rootElement.append(loaderDiv); + loaderDiv.append(spinnerDiv); + errorRootDiv.append(errorDiv); + this.customItemDiv.append(errorRootDiv); + this.rootElement.append(this.customItemDiv); + }; + EJBarcode.prototype.onPropertyChange = function (name, oldValue, newValue) { + var args = []; + for (var _i = 3; _i < arguments.length; _i++) { + args[_i - 3] = arguments[_i]; + } + switch (name) { + case 'BarcodeValue': + this.updatePropertyVal(name, newValue); + break; + case 'BarcodeType': + this.updatePropertyVal(name, newValue); + break; + case 'DisplayBarcodeText': + this.updatePropertyVal(name, (newValue === true) ? 'true' : 'false'); + } + }; + EJBarcode.prototype.onPositionChanged = function (top, left) { + }; + EJBarcode.prototype.onSizeChanged = function (height, width) { + if (!ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) { + this.customItemDiv.css({ + width: width, + height: height + }); + } + else if (!ej.isNullOrUndefined(height) && ej.isNullOrUndefined(width)) { + this.customItemDiv.css({ + height: height + }); + } + else if (ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) { + this.customItemDiv.css({ + width: width + }); + } + }; + EJBarcode.prototype.getPropertyGridItems = function () { + var propertyItems = { + 'HeaderText': this.customJSON.Name, + 'PropertyType': 'barcode', + 'SubType': 'barcode', + 'IsEditHeader': true, + 'Items': [{ + 'CategoryId': 'basicsettings', + 'DisplayName': this.getLocale('categoryBasicSettings'), + 'IsExpand': true, + 'Items': [ + { + 'ItemId': 'barcodetype', + 'Name': 'BarcodeType', + 'DisplayName': this.getLocale('BarcodeType'), + 'Value': this.getPropertyVal('BarcodeType'), + 'ItemType': 'DropDown', + 'EnableExpression': false, + 'ValueList': ['Code39', 'Code39Extended', 'Code11', 'Codabar', 'Code93', 'Code128A', 'Code128B', + 'Code128C', 'UpcBarcode', 'EAN-13', 'EAN-8', 'Code39 Mod 43', 'Interleaved 2 of 5', + 'Standard 2 of 5', 'Pharmacode'] + }, + { + 'ItemId': 'barcodevalue', + 'Name': 'BarcodeValue', + 'DisplayName': this.getLocale('barcodeValue'), + 'EnableExpression': true, + 'Value': this.getPropertyVal('BarcodeValue'), + 'ItemType': 'TextBox' + }, + { + 'ItemId': 'displaybarcodetext', + 'Name': 'DisplayBarcodeText', + 'DisplayName': this.getLocale('displayText'), + 'Value': this.isDisplayText() ? true : false, + 'ItemType': 'Bool', + 'EnableExpression': false + } + ] + } + ] + }; + return propertyItems; + }; + EJBarcode.prototype.getPropertyVal = function (name) { + if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { + for (var index = 0; index < this.customJSON.CustomProperties.length; index++) { + if (this.customJSON.CustomProperties[index].Name === name) { + return this.customJSON.CustomProperties[index].Value; + } + } + } + return null; + }; + EJBarcode.prototype.setPropertyVal = function (name, val) { + if (this.customJSON.CustomProperties === null) { + this.customJSON.CustomProperties = []; + } + this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val)); + }; + EJBarcode.prototype.updatePropertyVal = function (propertyName, value) { + if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { + for (var index = 0; index < this.customJSON.CustomProperties.length; index++) { + if (this.customJSON.CustomProperties[index].Name === propertyName) { + this.customJSON.CustomProperties[index].Value = value; + } + } + } + }; + EJBarcode.prototype.getReportItemJson = function () { + if (this.customJSON === null) { + this.customJSON = new ej.ReportModel.CustomReportItem().getModel(); + this.setPropertyVal('BarcodeValue', '00000'); + this.setPropertyVal('BarcodeType', 'Code39'); + this.setPropertyVal('DisplayBarcodeText', 'true'); + } + return this.customJSON; + }; + EJBarcode.prototype.setReportItemJson = function (reportItem) { + this.customJSON = reportItem; + }; + EJBarcode.prototype.dispose = function () { + }; + EJBarcode.prototype.isDisplayText = function () { + return (this.getPropertyVal('DisplayBarcodeText').toLowerCase()) === 'true'; + }; + EJBarcode.prototype.getLocale = function (text) { + var barcodeLocale; + var defaultLocale = EJBarcode.Locale['en-US']; + if (this.reportDesigner && !ej.isNullOrUndefined(this.reportDesigner.model) && + !ej.isNullOrUndefined(EJBarcode.Locale[this.reportDesigner.model.locale])) { + barcodeLocale = EJBarcode.Locale[this.reportDesigner.model.locale]; + } + else { + barcodeLocale = defaultLocale; + } + switch (text.toLowerCase()) { + case 'barcodevalue': + if (barcodeLocale && barcodeLocale.barcodeValue) { + return barcodeLocale.barcodeValue; + } + return defaultLocale.barcodeValue; + case 'barcodetype': + if (barcodeLocale && barcodeLocale.barcodeType) { + return barcodeLocale.barcodeType; + } + return defaultLocale.barcodeType; + case 'displaytext': + if (barcodeLocale && barcodeLocale.textVisibility) { + return barcodeLocale.textVisibility; + } + return defaultLocale.textVisibility; + case 'categorybasicsettings': + if (barcodeLocale && barcodeLocale.categoryBasicSettings) { + return barcodeLocale.categoryBasicSettings; + } + return defaultLocale.categoryBasicSettings; + } + return text; + }; + EJBarcode.prototype.renderData = function (args) { + this.customItemDiv.css('background-image', 'none'); + if (args && args.data && typeof args.data === 'string' && args.data.indexOf('Sf_Exception') !== -1) { + this.errMsgDiv.css('display', 'table'); + this.errMsgDiv.find('div').text('Failed to load barcode - ' + args.data.replace('Sf_Exception - ', '')); + } + else if (args.isLoaded && args.data) { + this.errMsgDiv.css('display', 'none'); + this.customItemDiv.css({ + 'background-image': 'url(data:image/BMP;base64,' + args.data + ')', + 'background-size': 'auto 100%', + 'background-repeat': 'no-repeat', + 'background-position': 'left top' + }); + } + else { + this.errMsgDiv.css('display', 'table'); + this.errMsgDiv.find('div').text('Failed to load barcode'); + } + }; + EJBarcode.prototype.showIndicator = function (isShow) { + this.loaderDiv.css('display', isShow ? 'block' : 'none'); + }; + return EJBarcode; +}()); +EJBarcode.Locale = {}; +EJBarcode.Locale['en-US'] = { + barcodeValue: 'Text', + barcodeType: 'Symbology Type', + textVisibility: 'Text Visibility', + categoryBasicSettings: 'Basic Settings', + toolTip: { + requirements: 'Display any barcode type.', + description: 'Displays the barcodes.', + title: 'Barcode' + } +}; +EJBarcode.Locale['fr-FR'] = { + barcodeValue: 'Texte', + barcodeType: 'Type de symbologie', + textVisibility: 'Visibilite du texte', + categoryBasicSettings: 'Paramètres de base', + toolTip: { + requirements: 'Afficher n\'importe quel type de code à barres.', + description: 'Affiche les codes barres.', + title: 'code à barre' + } +}; diff --git a/wwwroot/scripts/extensions/qrbarcode.js b/wwwroot/scripts/extensions/qrbarcode.js new file mode 100644 index 0000000..ad69453 --- /dev/null +++ b/wwwroot/scripts/extensions/qrbarcode.js @@ -0,0 +1,302 @@ +var EJQRBarcode = (function () { + function EJQRBarcode(rptDesigner) { + this.customJSON = null; + this.rootElement = null; + this.customItemDiv = null; + this.reportDesigner = null; + this.loaderDiv = null; + this.errMsgDiv = null; + this.reportDesigner = rptDesigner; + } + EJQRBarcode.prototype.initializeItem = function (args) { + args.isBuildInService = true; + args.defaultHeight = 160; + args.defaultWidth = 160; + args.minimumHeight = 15; + args.minimumWidth = 15; + args.renderCallback = $.proxy(this.renderData, this); + args.loadingCallback = $.proxy(this.showIndicator, this); + }; + EJQRBarcode.prototype.renderItem = function (customJson, target) { + this.customJSON = customJson; + this.rootElement = target; + this.renderBarcode(); + }; + EJQRBarcode.prototype.renderBarcode = function () { + this.customItemDiv = ej.buildTag('div.customitem', '', { + 'width': '100%', + 'height': '100%', + 'border': '1pt dotted gray', + 'box-sizing': 'border-box', + '-moz-box-sizing': 'border-box', + '-webkit-box-sizing': 'border-box', + 'overflow': 'hidden', 'position': 'absolute' + }, { + 'id': this.customJSON.Name + '_customItem' + }); + var loaderDiv = this.loaderDiv = ej.buildTag('div.e-rptdesigner-loaderDiv', '', { + 'width': '100%', 'height': '100%', 'display': 'none', 'opacity': '0.9', + 'position': 'absolute', 'border': '0.5px dotted black', + 'background-color': 'white', + 'z-index': '4000', 'overflow': 'hidden' + }); + var spinnerDiv = ej.buildTag('div.e-rptdesigner-spinnerDiv', '', { + 'border': '5px solid #f3f3f3', + 'border-radius': '50%', 'margin': '-17.5px 0 0 -17.5px', + 'border-top': '5px solid #3498db', + '-webkit-animation': 'spin 2s linear infinite', + 'animation': 'spin 2s linear infinite', + 'background': 'transparent', + 'position': 'absolute', + 'left': '50%', + 'top': '50%', + 'cursor': 'default', + 'height': '25px', + 'width': '25px' + }); + var errorRootDiv = this.errMsgDiv = ej.buildTag('div', '', { + 'display': 'none', 'position': 'relative', 'z-index': '3000', + 'font-family': 'Segoe UI', 'font-size': '13px', 'height': '100%', 'width': '100%' + }); + var errorDiv = ej.buildTag('div', 'Failed to load barcode', { + 'display': 'table-cell', 'overflow': 'hidden', 'font-family': 'Segoe UI', + 'font-size': '13px', 'vertical-align': 'middle', 'text-align': 'center' + }); + this.rootElement.append(loaderDiv); + loaderDiv.append(spinnerDiv); + errorRootDiv.append(errorDiv); + this.customItemDiv.append(errorRootDiv); + this.rootElement.append(this.customItemDiv); + }; + EJQRBarcode.prototype.onPropertyChange = function (name, oldValue, newValue) { + var args = []; + for (var _i = 3; _i < arguments.length; _i++) { + args[_i - 3] = arguments[_i]; + } + switch (name) { + case 'BarcodeType': + newValue = this.setBarcodeType(newValue); + this.updatePropertyVal(name, newValue); + break; + case 'BarcodeValue': + this.updatePropertyVal(name, newValue); + break; + case 'DisplayBarcodeText': + this.updatePropertyVal(name, (newValue === true) ? 'true' : 'false'); + } + }; + EJQRBarcode.prototype.onPositionChanged = function (top, left) { + }; + EJQRBarcode.prototype.onSizeChanged = function (height, width) { + if (!ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) { + this.customItemDiv.css({ + width: width, + height: height + }); + } + else if (!ej.isNullOrUndefined(height) && ej.isNullOrUndefined(width)) { + this.customItemDiv.css({ + height: height + }); + } + else if (ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) { + this.customItemDiv.css({ + width: width + }); + } + }; + EJQRBarcode.prototype.getPropertyGridItems = function () { + var propertyItems = { + 'HeaderText': this.customJSON.Name, + 'PropertyType': 'qrbarcode', + 'SubType': 'qrbarcode', + 'IsEditHeader': true, + 'Items': [{ + 'CategoryId': 'basicsettings', + 'DisplayName': this.getLocale('categoryBasicSettings'), + 'IsExpand': true, + 'Items': [ + { + 'ItemId': 'barcodetype', + 'Name': 'BarcodeType', + 'DisplayName': this.getLocale('BarcodeType'), + 'Value': this.getBarcodeType(this.getPropertyVal('BarcodeType')), + 'ItemType': 'DropDown', + 'EnableExpression': false, + 'ValueList': ['QR Barcode', 'Data Matrix', 'PDF417'], + 'DependentItems': [ + { + EnableItems: ['basicsettings_displaybarcodetext'], + DisableItems: [], + Value: ['QR Barcode'] + }, + { + EnableItems: [], + DisableItems: ['basicsettings_displaybarcodetext'], + Value: ['Data Matrix', 'PDF417'] + } + ] + }, + { + 'ItemId': 'barcodevalue', + 'Name': 'BarcodeValue', + 'DisplayName': this.getLocale('barcodeValue'), + 'EnableExpression': true, + 'Value': this.getPropertyVal('BarcodeValue'), + 'ItemType': 'TextBox' + }, + { + 'ItemId': 'displaybarcodetext', + 'Name': 'DisplayBarcodeText', + 'DisplayName': this.getLocale('displayText'), + 'Value': this.isDisplayText() ? true : false, + 'ItemType': 'Bool', + 'EnableExpression': false, + 'ParentId': 'basicsettings_barcodetype' + } + ] + } + ] + }; + return propertyItems; + }; + EJQRBarcode.prototype.getPropertyVal = function (name) { + if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { + for (var index = 0; index < this.customJSON.CustomProperties.length; index++) { + if (this.customJSON.CustomProperties[index].Name === name) { + return this.customJSON.CustomProperties[index].Value; + } + } + } + return null; + }; + EJQRBarcode.prototype.getBarcodeType = function (type) { + switch (type.toLowerCase()) { + case 'qrbarcode': return 'QR Barcode'; + case 'datamatrix': return 'Data Matrix'; + case 'pdf417': return 'PDF417'; + } + return type; + }; + EJQRBarcode.prototype.setBarcodeType = function (type) { + switch (type.toLowerCase()) { + case 'qr barcode': return 'QRBarcode'; + case 'data matrix': return 'DataMatrix'; + case 'pdf417': return 'PDF417'; + } + return type; + }; + EJQRBarcode.prototype.setPropertyVal = function (name, val) { + if (this.customJSON.CustomProperties === null) { + this.customJSON.CustomProperties = []; + } + this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val)); + }; + EJQRBarcode.prototype.updatePropertyVal = function (propertyName, value) { + if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { + for (var index = 0; index < this.customJSON.CustomProperties.length; index++) { + if (this.customJSON.CustomProperties[index].Name === propertyName) { + this.customJSON.CustomProperties[index].Value = value; + } + } + } + }; + EJQRBarcode.prototype.getReportItemJson = function () { + if (this.customJSON === null) { + this.customJSON = new ej.ReportModel.CustomReportItem().getModel(); + this.setPropertyVal('BarcodeValue', '00000'); + this.setPropertyVal('BarcodeType', 'QRBarcode'); + this.setPropertyVal('DisplayBarcodeText', 'true'); + } + return this.customJSON; + }; + EJQRBarcode.prototype.setReportItemJson = function (reportItem) { + this.customJSON = reportItem; + }; + EJQRBarcode.prototype.dispose = function () { + }; + EJQRBarcode.prototype.isDisplayText = function () { + return (this.getPropertyVal('DisplayBarcodeText').toLowerCase()) === 'true'; + }; + EJQRBarcode.prototype.getLocale = function (text) { + var barcodeLocale; + var defaultLocale = EJQRBarcode.Locale['en-US']; + if (this.reportDesigner && !ej.isNullOrUndefined(this.reportDesigner.model) && + !ej.isNullOrUndefined(EJQRBarcode.Locale[this.reportDesigner.model.locale])) { + barcodeLocale = EJQRBarcode.Locale[this.reportDesigner.model.locale]; + } + else { + barcodeLocale = defaultLocale; + } + switch (text.toLowerCase()) { + case 'barcodetype': + if (barcodeLocale && barcodeLocale.barcodeType) { + return barcodeLocale.barcodeType; + } + return defaultLocale.barcodeType; + case 'barcodevalue': + if (barcodeLocale && barcodeLocale.barcodeValue) { + return barcodeLocale.barcodeValue; + } + return defaultLocale.barcodeValue; + case 'displaytext': + if (barcodeLocale && barcodeLocale.textVisibility) { + return barcodeLocale.textVisibility; + } + return defaultLocale.textVisibility; + case 'categorybasicsettings': + if (barcodeLocale && barcodeLocale.categoryBasicSettings) { + return barcodeLocale.categoryBasicSettings; + } + return defaultLocale.categoryBasicSettings; + } + return text; + }; + EJQRBarcode.prototype.renderData = function (args) { + this.customItemDiv.css('background-image', 'none'); + if (args && args.data && typeof args.data === 'string' && args.data.indexOf('Sf_Exception') !== -1) { + this.errMsgDiv.css('display', 'table'); + this.errMsgDiv.find('div').text('Failed to load barcode - ' + args.data.replace('Sf_Exception - ', '')); + } + else if (args.isLoaded && args.data) { + this.errMsgDiv.css('display', 'none'); + this.customItemDiv.css({ + 'background-image': 'url(data:image/BMP;base64,' + args.data + ')', + 'background-size': 'auto 100%', + 'background-repeat': 'no-repeat', + 'background-position': 'left top' + }); + } + else { + this.errMsgDiv.css('display', 'table'); + this.errMsgDiv.find('div').text('Failed to load barcode'); + } + }; + EJQRBarcode.prototype.showIndicator = function (isShow) { + this.loaderDiv.css('display', isShow ? 'block' : 'none'); + }; + return EJQRBarcode; +}()); +EJQRBarcode.Locale = {}; +EJQRBarcode.Locale['en-US'] = { + barcodeType: 'Symbology Type', + barcodeValue: 'Text', + textVisibility: 'Text Visibility', + categoryBasicSettings: 'Basic Settings', + toolTip: { + requirements: 'Display any barcode type.', + description: 'Displays the barcodes.', + title: 'QRBarcode' + } +}; +EJQRBarcode.Locale['fr-FR'] = { + barcodeType: 'Type de symbologie', + barcodeValue: 'Texte', + textVisibility: 'Visibilite du texte', + categoryBasicSettings: 'Paramètres de base', + toolTip: { + requirements: 'Afficher n\'importe quel type de code à barres.', + description: 'Affiche les codes barres.', + title: 'QRBarcode' + } +};