Hi,
I need to show a RDLC report in Acrobat PDF Viewer which should be integrated as activex control in a form in .net Windows Forms application.
Im using the same concept in web application, and the code for the same is as follows...
dvpdf.Visible = true;
dvReport.Visible = false;
Warning[] warnings;
string[] streamIds;
string mimeType = string.Empty;
string encoding = string.Empty;
string extension = string.Empty;
byte[] bytes = this.ReportViewer1.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings);
String strfilename = System.IO.Path.GetRandomFileName();
using (FileStream fs = new FileStream(Server.MapPath("~/pdfoutput/") + strfilename + ".pdf", FileMode.Create))
{
fs.Write(bytes, 0, bytes.Length);
}
StringBuilder sb = new StringBuilder();
sb.Append("<object data='" + "pdfoutput/" + strfilename + ".pdf" + "' type='application/pdf' width='916' height='470'>");
sb.Append("</object>");
this.dvpdf.InnerHtml = sb.ToString();
from this it is showing the report in PDF format in Acrobat Reader which is installed on the machine.
Now, how it can be done in the windows forms application.
Please help me.
Thanks in advance. Regards
Sri