//// // GET: /Home/ public ActionResult Index() { //ViewData["Message"] = "Press Button to download report (pdf)"; //return View(); ArticleExample AE = new ArticleExample(); AE.Test(false, "D:\\Rsc\\ReportPdfFileWriter\\ReportPdfFileWriter\\ReportPdfFileWriter\\ReportPdfFileWriterWeeklyReportpdf.pdf"); return View(); }
//////////////////////////////////////////////////////////////////// // Article example //////////////////////////////////////////////////////////////////// private void OnArticleExample ( object sender, EventArgs e ) { ExceptionReport.Wrap("PDF Document creation falied", delegate { ArticleExample AE = new ArticleExample(); AE.Test(DebugCheckBox.Checked, "ArticleExample.pdf"); return; }); }
//////////////////////////////////////////////////////////////////// // Article example //////////////////////////////////////////////////////////////////// private void OnArticleExample ( object sender, EventArgs e ) { try { ArticleExample AE = new ArticleExample(); AE.Test(DebugCheckBox.Checked, "ArticleExample.pdf"); return; } catch (Exception Ex) { // error exit String[] ExceptionStack = ExceptionReport.GetMessageAndStack(Ex); MessageBox.Show(this, "PDF Document creation falied\n" + ExceptionStack[0] + "\n" + ExceptionStack[1], "PDFDocument Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } }
private void OnArticleExample(object sender, RoutedEventArgs e) { ArticleExample Example = new ArticleExample(); Example.Test(false, "ArticleExample.pdf"); }