Live Demonstration
Click here for Live Demo
The following is the code behind file for the default
page of the live demonstration.
Visual Basic
Imports GridViewPrint
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object,
ByVal e As System.EventArgs) Handles Button1.Click
GView.Print(SqlDataSource2,GridView1,
"Reports/GridViewReport.rdlc", "GridViewDataset_Products", "Report.pdf")
End Sub
Protected Sub Button2_Click(ByVal sender As Object,
ByVal e As System.EventArgs) Handles Button2.Click
GView.Print(SqlDataSource2,GridView1,
"Reports/GridViewReport.rdlc", "GridViewDataset_Products", "Report.xls")
End Sub
C#
using GridViewPrint;
public partial class _Default : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
GView.Print(SqlDataSource2, GridView1, "Reports/GridViewReport.rdlc", "GridViewDataset_Products", "Report.pdf");
}
}

Structure of demonstration website
Click here to view the demonstration website.

|