Posts

Current Row + Sum of Previous Rows SQL Server

Image
          In This Section, We See About How To Calculate Previous Row Sum value + Next Rows Values in SQL Server. We Sum Values One by One Orderly.  Table SQL ; WITH cte AS (    SELECT ID , Prod , Value Val , SUM ( Value ) Valsum    FROM mData    gROUP BY ID , Prod , Value   ), cteRanked AS (    SELECT Valsum , ID , Prod , ROW_NUMBER () OVER ( ORDER BY Id ) rownum    FROM cte ) SELECT ( SELECT SUM ( Valsum ) FROM cteRanked c2 WHERE c2 . rownum <= c1 . rownum ) AS Value , ID , Prod FROM cteRanked c1 ; Result:

Worksheet Names Cannot be more than 31 Characters c#

           Hi, Today I am Facing This Issue In My Project. When We Write Excel Sheet C# Via. In Excel, SheetName Allows Only 31 Characters. Otherwise, You Can Write More then 31 Characters You Will Faced This Issue.          I Am using Closed XML  for Write Excel Sheet. To Rectify this issue to Write Following Code. You can Write The SheetName.     using (XLWorkbook wb = new XLWorkbook())                 {                     wb.Worksheets.Add(dt,"Sheetname");

Display Line Chart Using Chart.js MVC C#

Image
          In this Section We See about How to Display Line Chart Using Chart.js in MVC C# Jquery , Ajax Services. Already we seens  Chart.js PieCharts  and Doughnut Chart . In this section I am Using Sql Server Databse and Create One Ajax Services For Data Get. and Using  Chart.js  Tool. View Page:-          @{     Layout = null ; } < !DOCTYPE html > < html > < head >     < meta name ="viewport" content ="width=device-width" />     < title > DisplayLineChart </ title >     < script src ="https://code.jquery.com/jquery-1.12.4.js"></ script >     < script src ="~/Scripts/ChartJs/charts/Chart.bundle.min.js"></ script >     < script type ="text/javascript">         $(document).ready( funct...

Chart.js Doughnut Chart MVC C#

Image
     In this Section, We See about How to Display Doughnut Chart Using Chart.js in MVC C# Jquery, Ajax Services. Already we see Chart.js PieCharts . In this section, I am Using SQL Server Database and Create One Ajax Services For Data Get. and Using Chart.js Tool. View Page:- @{     Layout = null ; } < !DOCTYPE html > < html > < head >     < meta name ="viewport" content ="width=device-width" />     < title > DoughnutChart </ title >             < script src ="https://code.jquery.com/jquery-1.12.4.js"></ script >     < script src ="~/Scripts/ChartJs/charts/Chart.js"></ script >         < script type ="text/javascript">         $(document).ready( function () {      ...