public HttpResponseMessage obtenerReportePlatosVendidos(List <dynamic> data)
        {
            DataSet1  ds = new DataSet1();
            DataTable t  = ds.Tables.Add("Items");
            DataRow   r;



            t.Columns.Add("Nombre del plato", Type.GetType("System.String"));
            t.Columns.Add("Cantidad vendida", Type.GetType("System.Int32"));

            for (int i = 0; i < data.Count; i++)
            {
                Debug.WriteLine("paso por aca");
                r = t.NewRow();
                r["Cantidad vendida"] = data[i]["Cantidad"];
                r["Nombre del plato"] = data[i]["Nombre"];
                t.Rows.Add(r);
            }

            CrystalReport1 objRpt = new CrystalReport1();

            objRpt.SetDataSource(ds.Tables[1]);
            Debug.WriteLine(objRpt.ReportSource);
            ReportDocument cryRpt = new ReportDocument();

            cryRpt.Load("C:\\Users\\braya\\Desktop\\bases\\Tarea_corta\\Servidor_API\\CReports\\CrystalReport1.rpt");



            ExportOptions CrExportOptions;
            DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
            PdfRtfWordFormatOptions    CrFormatTypeOptions          = new PdfRtfWordFormatOptions();

            CrDiskFileDestinationOptions.DiskFileName = "C:\\Users\\braya\\Desktop\\bases\\Tarea_corta\\Servidor_API\\CReports\\report.pdf";
            CrExportOptions = objRpt.ExportOptions;
            {
                CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                CrExportOptions.ExportFormatType      = ExportFormatType.PortableDocFormat;
                CrExportOptions.DestinationOptions    = CrDiskFileDestinationOptions;
                CrExportOptions.FormatOptions         = CrFormatTypeOptions;
            }



            Stream stream = objRpt.ExportToStream(ExportFormatType.PortableDocFormat);

            objRpt.Export(CrExportOptions);
            MemoryStream ms = new MemoryStream();

            stream.CopyTo(ms);
            var result = new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new ByteArrayContent(ms.ToArray())
            };

            result.Content.Headers.ContentDisposition =
                new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment")
            {
                FileName = "Report.pdf"
            };
            result.Content.Headers.ContentType =
                new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream");
            return(result);
        }