or
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Telerik.Reporting;using ReportTestss;using ReportInstantiate;namespace ReportInstantiate{ public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { test report = new test(); report.ReportParameters["StudID"].Value = "SCH10001/2013"; } } }}| Dim objUser As Elements.User = Session("User") |
| Dim report As Report = New GuideExport(objUser.QueryResults.XmlDocument) |
| Dim Buffer As Byte() = Telerik.Reporting.Processing.ReportProcessor.Render("PDF", _ |
| report, Nothing, "", "", Nothing) |
| Response.ClearContent() |
| Response.AppendHeader("content-length", Buffer.Length.ToString()) |
| Response.ContentType = "application/pdf" |
| Response.BinaryWrite(Buffer) |
| Response.Flush() |
| Response.Close() |