This error occured first time, definition is invalid.
When I debug again, the error changing into :
AspNetCore.Reporting.LocalProcessingException: An error occurred during local report processing.;The process cannot access the file
'C:\Users\OPTIMUS PRIME\AppData\Local\Temp\b75e496e6c4d453fbf39526dd5952c14.xls.tmp' because it is being used by another process.
---> System.IO.IOException: The process cannot access the file 'C:\Users\OPTIMUS PRIME\AppData\Local\Temp\b75e496e6c4d453fbf39526dd5952c14.xls.tmp'
because it is being used by another process. at System.IO.FileSystem.DeleteFile(String fullPath)
at System.IO.File.Delete(String path)
at AspNetCore.ReportingServices.Rendering.ExcelRenderer.ExcelGenerator.BIFF8.StructuredStorage.CreateSingleStreamFile(Stream source, String streamName, String clsId, Stream output, Boolean forceInMemory)
at AspNetCore.ReportingServices.Rendering.ExcelRenderer.Excel.BIFF8.BIFF8Generator.SaveSpreadsheet(Stream outputStream, Stream backgroundImage, UInt16 backgroundImageWidth, UInt16 backgroundImageHeight)
at AspNetCore.ReportingServices.Rendering.ExcelRenderer.MainEngine.Save(Stream output)
at AspNetCore.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream)
--- End of inner exception stack trace ---
at AspNetCore.Reporting.InternalLocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)
at AspNetCore.Reporting.InternalLocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
at AspNetCore.Reporting.InternalLocalReport.Render(String format, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) at AspNetCore.Reporting.LocalReport.Execute(RenderType renderType, Int32 pageIndex, Dictionary`2 parameters, String findString)
at ProjectName.Controllers.ReportController.ReportBrandingAsync(String Cabang, String DisplayProgram, String Brand, String DateFrom, String DateTo)
in ProjectDirName\Controllers\ReportController.cs:line 267
I try to run :
LocalReport localReport = new LocalReport(path);
localReport.AddDataSource("dsBranding", oResult);
var result = localReport.Execute(RenderType.Excel, extension, parameters, mimeType);
And because the error is so weird, changing twice but I am not doing anything, then I try to check my disk that C drive is full.
Trying to delete some files freeing some space, and not changing code, the report is fine again