.rdlc 파일에서 브라우저를 막 잡는 ReportViewer
컨트롤을 생략하고 코드 수준에서 커다란 비 그래픽 보고서 (수천 페이지)를 렌더링하려고합니다. 다소 약 2000 페이지 인 보고서를 렌더링하기 위해 테스트 할 때 Microsoft.Reporting.WebForms.LocalReport.Render
메서드를 완료하는 데 약 30 분이 소요되며, 이는 나쁜 사용자 환경으로 간주됩니다.코드에서 .rdlc에서 PDF를 내보낼 때 LocalReport.Render 메서드의 성능을 어떻게 향상시킬 수 있습니까?
렌더링 성능을 향상시키는 트릭이나 대체 솔루션이 있습니까? 코드에서 .rdlc 파일을 다시 디자인하거나 하드웨어를 늘리는 것과 같은 다른 방법이 있습니까?
예제 코드 :
LocalReport localReport = new LocalReport();
localReport.ReportPath = Server.MapPath("~/report.rdlc");
SetDataSources(ref localReport);
string reportType = "PDF";
string mimeType;
string encoding;
string fileNameExtension;
string deviceInfo =
"<DeviceInfo>" +
" <OutputFormat>PDF</OutputFormat>" +
" <PageWidth>8.5in</PageWidth>" +
" <PageHeight>11in</PageHeight>" +
" <MarginTop>0in</MarginTop>" +
" <MarginLeft>0in</MarginLeft>" +
" <MarginRight>0in</MarginRight>" +
" <MarginBottom>0in</MarginBottom>" +
"</DeviceInfo>";
}
Warning[] warnings;
string[] streams;
byte[] renderedBytes;
//Render the report
renderedBytes = localReport.Render(
reportType,
deviceInfo,
out mimeType,
out encoding,
out fileNameExtension,
out streams,
out warnings);
어떤 도움이 많이 감사합니다 사전에 감사합니다! 데이터 소스로 데이터 테이블 반환