1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
rs.ServerReport.ReportPath = "monRapport";
rs1.ServerReport.ReportPath = "monRapport2";
string reportType = "PDF";
string mimeType;
string encoding;
string extension;
Warning[] warnings;
string deviceInfo =
"<DeviceInfo>" +
" <OutputFormat>PDF</OutputFormat>" +
" <PageWidth> 29.7cm</PageWidth>" +
" <PageHeight>21cm</PageHeight>" +
" <MarginTop>1cm</MarginTop>" +
" <MarginRight>1cm</MarginRight>" +
" <MarginLeft>1cm</MarginLeft>" +
" <MarginBottom>1cm</MarginBottom>" +
"</DeviceInfo>";
string[] streams;
byte[] page = rs.ServerReport.Render(
reportType,
deviceInfo,
out mimeType,
out encoding,
out extension,
out streams,
out warnings
);
byte[] page2 = rs1.ServerReport.Render(
reportType,
deviceInfo,
out mimeType,
out encoding,
out extension,
out streams,
out warnings
);
FileStream fr = new FileStream("monDossier." + extension, FileMode.Create);
fr.Write(page, 0, page.Length);
fr.Write(page2, 0, page2.Length);
fr.Close(); |
Partager