Thanks a lot. Your solution (using mapping) has solved my problem of redirecting. I can now export into either Excel or PDF files. I am assuming there won't be any issues if I deploy the solution to Azure environment (both WEB and SQL back-end).
However I have an error occurring if I am trying to export as a word document. I am suspecting it could be something do with the local assemblies? I am running Visual studio 2015 and using Syncfusion 13.3.0.7, C# 4.6. I am happy with the ability to export into excel (and pdf) it will be nicer to have word working as well but not necessary thought I raise the issue with you
I have copy pasted the error message below.
System.ArgumentOutOfRangeException was unhandled by user code
HResult=-2146233086
Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
ParamName=index
Source=mscorlib
StackTrace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1.System.Collections.IList.get_Item(Int32 index)
at Syncfusion.DocIO.DLS.WCellCollection.get_Item(Int32 index)
at Syncfusion.EJ.Export.GridWordExport.ExportRecordRow(String value, GridTableCellType style)
at Syncfusion.EJ.Export.GridWordExport.ProcessColumnHeader(Column column)
at Syncfusion.EJ.Export.GridWordExport.ProcessHeaderContent()
at Syncfusion.EJ.Export.GridWordExport.IterateElements()
at Syncfusion.EJ.Export.GridWordExport.ExportHandler()
at Syncfusion.EJ.Export.GridWordExport.MultipleColumnExport(Int32 count, Int32 templateColumncount, Int32 hideColumnCount)
at Syncfusion.EJ.Export.GridWordExport.ExecuteResult(GridProperties GridModel, IEnumerable dataSource)
at Syncfusion.EJ.Export.GridWordExport.Export(GridProperties gridModel, IEnumerable dataSource, Boolean multipleExport)
at Syncfusion.EJ.Export.WordExport.Export(GridProperties gridmaodel, IEnumerable datasource, String fileName, Boolean isHideColumnIncude, Boolean isTemplateColumnIclude, Boolean isAutoFit, String theme)
at Syncfusion.EJ.Export.WordExport.Export(GridProperties gridmaodel, IEnumerable datasource, String fileName, Boolean isHideColumnIncude, Boolean isTemplateColumnIclude, String theme)
at Syncfusion.EJ.Export.WordExport.Export(GridProperties gridmaodel, IEnumerable datasource, String fileName, Boolean isHideColumnIncude, Boolean isTemplateColumnIclude, ExportTheme theme)
at Troam.Website.Controllers.ProjectController.ExportToWord(String GridModel) in C:\Data\Software Development\Microsoft\Source\TROAM\Ntri.Troam\Source\Troam.Website\Controllers\ProjectController.cs:line 46
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.<>c__DisplayClass1.<WrapVoidAction>b__0(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
InnerException: