public static void ExcelPrintWithSubReport(string SpName, DataTable dataSource)
        {
            GridView gv = new GridView();
            gv.DataSource = dataSource;
            gv.DataBind();
            SpName = SpName + ".xls";
            HttpContext context = System.Web.HttpContext.Current;
            context.Response.ClearContent();
            context.Response.Buffer = true;
            context.Response.AddHeader("content-disposition", "attachment; filename= CheckData.xls");
            context.Response.ContentType = "application/ms-excel";
            context.Response.Charset = "";
            StringWriter sw = new StringWriter();
            HtmlTextWriter htw = new HtmlTextWriter(sw);
            gv.RenderControl(htw);
            context.Response.Output.Write(sw.ToString());
            context.Response.Flush();
            htw.Close();
            sw.Close();
            context.Response.End();
        }// End of Method
Tuesday, December 31, 2019
Datatable to excel Download
Delete Data From Joining Tables
Delete ev   FROM Evaluation AS ev
Inner Join Employee AS e ON ev.EmployeeId = e.EmployeeId
WHERE
e.OfficeId IN ( SELECT OfficeId FROM Office WHERE ThirdLevel = 2790 AND IsActive = 1 )
AND ev.Year = 2019
AND ev.EvaluationPeriodShort = 'D'
Inner Join Employee AS e ON ev.EmployeeId = e.EmployeeId
WHERE
e.OfficeId IN ( SELECT OfficeId FROM Office WHERE ThirdLevel = 2790 AND IsActive = 1 )
AND ev.Year = 2019
AND ev.EvaluationPeriodShort = 'D'
Subscribe to:
Comments (Atom)
Screen Record
Windows Screen Record WindowsKey+ Alt + R Recording Starts.
- 
https://jwt.io/ J SON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.
- 
ALTER FUNCTION [pksf].[fn_SplitString] ( @Input NVARCHAR(MAX), @Character CHAR(1) ) RETURNS @Output TABLE ( Item NVA...
- 
Create a function : CREATE FUNCTION split_string ( @in_string VARCHAR(MAX), @delimeter VARCHAR(1) ) RETURNS @list TABLE(tuple VARCH...
