<%@ Register Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
....
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" DisplayGroupTree="False" />
Kemudian di bagian Coding (Code Behind), tambahkan import :
using System.Data.SqlClient;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
Kemudian pada Button yang akan menampilkan Report tambahkan Kode Program seperti ini :
protected void buttonTrack_Click(object sender, EventArgs e)
{
DataTable data = new DataTable();
data = TampilTransaksi(tbNomorResi.Text);
//ViewTrackIndividu.DataSource = data;
//ViewTrackIndividu.DataBind();
//string Query = "select nomerresi from tabeltransaksi where nomerresi ='" + tbNomorResi.Text + "'";
//string noresi = FunctionManager.getdata(Query, 0);
ReportDocument report = new ReportDocument();
report.Load(Server.MapPath("~/RPTTransaksiIndividu.rpt"));
//@"E:\Update Web 1511\Ory\5702_E_Web\CrystalReportdekan.rpt");
//report.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
report.SetDataSource(data); //dsDataReport.Tables[0]);
CrystalReportViewer1.ReportSource = report;
}