2
ASP.NET MVC를 사용 중이고 뷰에서 rdlc를 렌더링하려고합니다. 다음은 rdlc 파일을 렌더링하는 코드입니다.ASP.NET MVC의 Rdlc가 제대로 렌더링되지 않습니다.
[HttpPost]
public ActionResult DepartmentwiseInwardOutwardReport(int? fd, int? td, string fdt, string tdt)
{
TrackBL trackBL = new TrackBL();
IEnumerable<TrackModel> trackList = trackBL.GetDeptInwardOutwardReport(fd, td, fdt, tdt);
//return PartialView("_TrackingSearchReport", trackList);
LocalReport localReport = new LocalReport();
localReport.ReportPath = Server.MapPath("~/Content/Reports/FileMovement.rdlc");
ReportDataSource reportDataSource = new ReportDataSource("Customers", trackList);
reportDataSource.Name = "FTSDataSet_proc_File_InwardOutWardReport";
localReport.DataSources.Add(reportDataSource);
string reportType = "PDF";
string mimeType;
string encoding;
string fileNameExtension;
//The DeviceInfo settings should be changed based on the reportType
//http://msdn2.microsoft.com/en-us/library/ms155397.aspx
string deviceInfo =
"<DeviceInfo>" +
" <OutputFormat>PDF</OutputFormat>" +
" <PageWidth>8.5in</PageWidth>" +
" <PageHeight>11in</PageHeight>" +
" <MarginTop>0.5in</MarginTop>" +
" <MarginLeft>1in</MarginLeft>" +
" <MarginRight>1in</MarginRight>" +
" <MarginBottom>0.5in</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);
//Response.AddHeader("content-disposition", "attachment; filename=NorthWindCustomers." + fileNameExtension);
return File(renderedBytes, mimeType);
뷰에서 렌더링 할 때 14 페이지를 볼 수 있습니다. 현재는 1 행만 표시됩니다. 각각 두 개의 열이 페이지에 표시됩니다. 모든 열이 다른 옆에 표시되는 보고서처럼 표시하고 싶습니다. 일부 설정이 누락 되었습니까? 어떤 제안?