COMA (,) AL GENERAR UN REPORTE PDF C#
Saludos,
Soy nuevo en el foro y tengo un problema. Estoy generando un reporte hecho con cristal report pero delpues de la extension se escribe una coma. Ejemplo: si el archivo se llama Reporte.pdf escribe Reporte.pdf,
Pero genera y abre bien el reporte mi inquietud es la coma (,). Este es el codigo que uso:
HttpResponse Response = HttpContext.Current.Response;
Response.Buffer = false;
Response.Clear();
Guid GuidPDF = Guid.NewGuid();
string a = GuidPDF.ToString();
string ReportFileName = string.Format("Orden_Impresion_{0}", GuidPDF.ToString()) + ".pdf";
Response.AddHeader("content-type", "application/pdf");
Response.AddHeader("Content-Disposition",
"attachment; filename=" + ReportFileName);
string ReportPath = HttpContext.Current.Server.MapPath("../Reportes/OrdenImpresionChequerasRpt.rpt");
this.GenerateReport(theDS, ExportFormatType.PortableDocFormat, ReportPath, ReportFileName, Response);
}
catch (Exception)
{
string script = @" alert('No se genero el archivo');";
ClientScript.RegisterStartupScript(typeof(Page), "Alerta", script);
throw;
}
Les agradeceria mucho si pueden ayudarme.
Soy nuevo en el foro y tengo un problema. Estoy generando un reporte hecho con cristal report pero delpues de la extension se escribe una coma. Ejemplo: si el archivo se llama Reporte.pdf escribe Reporte.pdf,
Pero genera y abre bien el reporte mi inquietud es la coma (,). Este es el codigo que uso:
HttpResponse Response = HttpContext.Current.Response;
Response.Buffer = false;
Response.Clear();
Guid GuidPDF = Guid.NewGuid();
string a = GuidPDF.ToString();
string ReportFileName = string.Format("Orden_Impresion_{0}", GuidPDF.ToString()) + ".pdf";
Response.AddHeader("content-type", "application/pdf");
Response.AddHeader("Content-Disposition",
"attachment; filename=" + ReportFileName);
string ReportPath = HttpContext.Current.Server.MapPath("../Reportes/OrdenImpresionChequerasRpt.rpt");
this.GenerateReport(theDS, ExportFormatType.PortableDocFormat, ReportPath, ReportFileName, Response);
}
catch (Exception)
{
string script = @" alert('No se genero el archivo');";
ClientScript.RegisterStartupScript(typeof(Page), "Alerta", script);
throw;
}
Les agradeceria mucho si pueden ayudarme.