Example #1
0
 public IHttpActionResult AdsIndexPrinterFriendly()
 {
     try
     {
         // create report object, Url is the public location where it can be viewed with a browser
         Report report = new Report();
         report.Name       = "AdsIndexPrinterFriendly";
         report.Filename   = "AdsIndexPrinterFriendly";
         report.SaveFormat = WdSaveFormat.wdFormatPDF;
         report.Extension  = AppCommon.GetExtensionFromWdSaveFormat(report.SaveFormat);
         report.Url        = AppCommon.BuildUrl(AppCommon.GetAppEngineUrl(), report.Filename + "." + AppCommon.GetExtensionFromWdSaveFormat(report.SaveFormat), AppCommon.GetAppEnginePort());
         // generate the report
         ReportManager.GenerateReport(report);
         // return the report properties
         return(Ok(report));
     }
     catch (Exception e)
     {
         string message = AppCommon.AppendInnerExceptionMessages("ReportsController.AdsIndexPrinterFriendly = " + e.Message, e);
         AppCommon.Log(message, EventLogEntryType.Error);
         throw new Exception(message);
     }
 } // AdsIndexPrinterFriendly()