var _reportDefFM = new PageReport(new FileInfo(@$"......rdlx")); _reportDefFM.Document.Parameters[0].CurrentValue = ID; var _renderingExtension = new PdfRenderingExtension(); var _str = new MemoryStreamProvider(); _reportDefFM.Document.LocateDataSource += document_LocateDataSource1; _reportDefFM.Document.Render(_renderingExtension, _str);