Hello, I'm attempting to export to pdf from javascript and get the following error from the api. Does anyone know what this error means and if there's anything I can do to get it working?
<Error><Message>An error has occurred.</Message><ExceptionMessage>Object reference not set to an instance of an object.</ExceptionMessage><ExceptionType>System.NullReferenceException</ExceptionType><StackTrace> at Syncfusion.EJ.Export.GridExcelExport.ProcessRecordCell(Object row, Column column)
at Syncfusion.EJ.Export.GridExcelExport.<>c__DisplayClasse.<ProcessRecordRow>b__d(Column column)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Syncfusion.EJ.Export.GridExcelExport.ProcessRecordRow(Object row)
at Syncfusion.EJ.Export.GridExcelExport.RenderRecord()
at Syncfusion.EJ.Export.GridExcelExport.ProcessGridContents()
at Syncfusion.EJ.Export.GridExcelExport.IterateElements()
at Syncfusion.EJ.Export.GridExcelExport.ExportHandler()
at Syncfusion.EJ.Export.GridExcelExport.ExecuteResult(GridProperties GridModel, Object dataSource)
at Syncfusion.EJ.Export.GridExcelExport.ExportHelper(GridProperties gridModel, Object dataSource)
at Syncfusion.EJ.Export.GridExcelExport.Export(GridProperties gridModel, Object dataSource, Boolean multipleExport)
at Syncfusion.EJ.Export.ExcelExport.Export(GridProperties gridmaodel, Object datasource, String excelname, ExcelVersion excelversion, Boolean isHideColumnIncude, Boolean isTemplateColumnIclude, String theme)
at Northwind.JSGridExportController.ExcelExport() in c:\Users\karthigeyan.krishnam\Desktop\ExportingServices\ExportingServices\Northwind\JSGridExportController.cs:line 33
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClassf.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4()
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)</StackTrace></Error>
My grid code follows:
$('#Grid').ejGrid({
dataSource: reportDetails,
enableRowHover: true,
allowTextWrap: false,
allowPaging: true,
allowSorting: true,
allowFiltering: true,
allowResizing: false,
allowResizeToFit: false,
allowKeyboardNavigation: true,
allowSearching: true,
allowMultipleExporting:true,
enablePersistance:true,
pageSettings: { pageSize: 25 },
filterSettings: { filterType: "excel" },
toolbarSettings: { showToolbar: true, toolbarItems: ["search", ej.Grid.ToolBarItems.ExcelExport] },
exportToExcelAction: 'http://js.syncfusion.com/ExportingServices/api/JSGridExport/ExcelExport',
columns: [
{ field: "Date", width: 115 },
{ field: "Name", width: 120 },
{ field: "Product" },
{ field: "Variation", width: 120},
{ field: "Buy", width: 90},
{ field: "Order Status", width: 90 },
{ field: "Payment Status", width: 90 },
{ field: "Shipping Status", width: 100 }
]
});
Thanks