Hi
We have made a reporting services report tha works well word format for page numbers but when we export it giving AWMHTML format from .net code using reportviewer export method it show Page XXX of XXX instead of page numbers in MHTML format. Any idea what is causing this issue and how it can be resolved?
Here is the sample code below which is generating the report.
string format = string.Empty;
if (Format == "2")
{
format = "AWDOC";
Response.ContentType = "application/vnd.word";
Response.AddHeader("Content-disposition", "attachment;filename=" + FileName + ".doc");
}
else if (Format == "1")
{
format = "Pdf";
Response.ContentType = "application/pdf";
Response.AddHeader("Content-disposition", "attachment;filename=" + FileName + ".pdf");
}
else if (Format == "3")
{
format = "AWMHTML";
Response.ContentType = "text/html";
Response.AddHeader("Content-disposition", "attachment;filename=" + FileName + ".MHTML");
}
deviceInfo = "" + "True" + "";
byte[] bytes = rViewer.ServerReport.Render(format, deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings);
Response.Clear();
Response.OutputStream.Write(bytes, 0, bytes.Length);
Response.OutputStream.Flush();
Response.OutputStream.Close();