public void Export()
 {
     string args = HttpContext.Current.Request.Form.GetValues(0)[0];
     Dictionary<string, string> gridParams = serializer.Deserialize<Dictionary<string, string>>(args);
     htmlHelper.PopulateData(gridParams["currentReport"]);
     string fileName = "Sample";
     htmlHelper.ExportPivotGrid(ProductSales.GetSalesData(), args, fileName, HttpContext.Current.Response);
 }
        public void Export(Stream stream)
        {
            System.IO.StreamReader sReader = new System.IO.StreamReader(stream);
            string args = System.Web.HttpContext.Current.Server.UrlDecode(sReader.ReadToEnd()).Remove(0, 5);
            Dictionary <string, string> gridParams = serializer.Deserialize <Dictionary <string, string> >(args);

            htmlHelper.PopulateData(gridParams["currentReport"]);
            string fileName = "Sample";

            htmlHelper.ExportPivotGrid(ProductSales.GetSalesData(), args, fileName, System.Web.HttpContext.Current.Response);
        }