0
pdf로 보고서를 출력하려고하는데 최종 출력물에 한 페이지 만 표시되는 것을 제외하고는 모든 것이 잘 보입니다. 데이터 소스에 개수 2가 표시되지만 최종 보고서에는 단 한 페이지 만 표시됩니다.첫 번째 페이지 만 출력하는 보고서
이것은 내가 코드가 무엇을 :
if (reportType == ReportType.AllJobs)
{
dataSource = BRInfoGateway.GetAllJobs(); //This shows a count of 2 during debug
reportName = "./Reports/AllJobs.rdlc";
}
else
{
dataSource = BRInfoGateway.GetJob(jobContext);
reportName = "./Reports/SpecificJob.rdlc";
}
var report = new LocalReport();
report.ReportPath = reportName;
report.DataSources.Add(new ReportDataSource("BRInfo", dataSource));
Warning[] warnings;
string[] streamids;
string mimeType;
string encoding;
string extension;
return report.Render("PDF", null, out mimeType, out encoding, out extension,
out streamids, out warnings);
그런 다음 내 테스트에 난 그냥 [] 바이트를 저장하고있다. 꽤 정상적인 ...
var reportData = Reports.ReportsGateway.GetReport(Reports.ReportType.AllJobs, null);
string filename = "AllJobs.pdf";
if(File.Exists(filename)) File.Delete(filename);
using (FileStream fs = File.Create(filename))
{
fs.Write(reportData, 0, reportData.Length);
}
어떤 생각. 보고서 템플릿에서 특정 작업을해야하는지 잘 모르겠습니다!
이것은 Crystal Reports가 아니며보고 서비스 – MartW