User-1600699211 posted
I have two byte arrays from rdlc reports.
I need to create a pdf combining both the byte arrays.
My code is
Warning[] warnings;
string[] streamIds;
string mimeType = string.Empty;
string encoding = string.Empty;
string extension = string.Empty;
bytes = rptViewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings);
bytes1 = RunReport(21316228, "82", 7);
byte[] combined = new byte[bytes.Length + bytes1.Length];
bytes.CopyTo(combined, 0);
Array.Copy(bytes1, 0, combined, bytes.Length, bytes1.Length);
FileStream stream = new FileStream(savePath, FileMode.Create, FileAccess.ReadWrite);
using (stream)
{
stream.Write(combined, 0, combined.Length);
}
The RunReport function returns bytes1 which is generated from another rdlc report. I can see the size of combined byte is fine but its just printing the 2nd byte but not appending 1 and 2.
I tried various other codes using Buffer.BlockCopy etc.. similar to this but all of them yield the same result.
Some one please help me out!