Usuário com melhor resposta
Erro ao criar um relatorio em PDF

Pergunta
-
Tenho um aplicativo que eu entro normalmente com login e senha, insiro dados e pesquiso normalmente, mas quando tento criar um relatório e mostra este erro gostaria de saber como resolver isso.
Mensagem de erro:
Server Error in '/Shalomweb' Application.
Could not find a part of the path 'C:\Relatorios_Sistema\2017-02-03 16-46-Ponto2.pdf'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Relatorios_Sistema\2017-02-03 16-46-Ponto2.pdf'.
Source Error:An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:[DirectoryNotFoundException: Could not find a part of the path 'C:\Relatorios_Sistema\2017-02-03 16-46-Ponto2.pdf'.] System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +353 System.IO.File.InternalDelete(String path, Boolean checkHost) +11437320 System.IO.File.Delete(String path) +22 frm_frmTelaprincipal.GerarPDF(String pCaminhoArquivoPDF) in d:\Programacao_Em_Uso\Horas_ADV_KNTS\Shalom\frm\frmPonto.aspx.cs:295 frm_frmTelaprincipal.btnImpressao_Click(Object sender, EventArgs e) in d:\Programacao_Em_Uso\Horas_ADV_KNTS\Shalom\frm\frmPonto.aspx.cs:677 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9692746 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3562
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1087.0
Respostas
-
Alexandre,
posta o codigo por favor
Diego Almeida Barreto</strong> <br/> <em>System Analyst / Software Developer</em> <br/> <img </p> </div>
- Marcado como Resposta Robson William SilvaModerator segunda-feira, 6 de fevereiro de 2017 11:58
Todas as Respostas
-
Alexandre,
posta o codigo por favor
Diego Almeida Barreto</strong> <br/> <em>System Analyst / Software Developer</em> <br/> <img </p> </div>
- Marcado como Resposta Robson William SilvaModerator segunda-feira, 6 de fevereiro de 2017 11:58
-
-
Bom dia,
Devido a falta de interação do autor dessa pergunta,
essa thread está sendo fechada. Caso o problema ainda
esteja ocorrendo, favor abrir uma nova thread.
Atenciosamente,
Robson William Silva
Esse conteúdo é fornecido sem garantias de qualquer tipo, seja expressa ou implícita
MSDN Community Support
Por favor, lembre-se de Marcar como Resposta as postagens que resolveram o seu problema. Essa é uma maneira comum de reconhecer aqueles que o ajudaram e fazer com que seja mais fácil para os outros visitantes encontrarem a resolução mais tarde.