Crystal Report is not display on page. Do I need to add some more syntax
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls; //Crystal Report Namespaces
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
namespace CRTest
{
public partial class Default : System.Web.UI.Page
{
CrystalReportTest rpt;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Page_Init(object sender, EventArgs e)
{
if (Session["report"] != null)
{
CrystalReportViewer1.ReportSource = (CrystalReportTest)Session["report"];
}
}
protected void Button1_Click(object sender, EventArgs e)
{ //looks 2 part CRDataset and ApplicantInfoKTableAdapter in CRDataset.xsd
//namespace CRTest.CRDataSetTableAdapters +public partial class ApplicantInfoKTableAdapter
CRDataSetTableAdapters.ApplicantInfoKTableAdapter da = new CRDataSetTableAdapters.ApplicantInfoKTableAdapter();
CRDataSet ds = new CRDataSet();
//database+table name
CRDataSet.ApplicantInfoKDataTable dt = (CRDataSet.ApplicantInfoKDataTable)
ds.Tables["ApplicantInfoK"];
da.Fill(dt);
rpt = new CrystalReportTest();
rpt.SetDataSource(ds);
CrystalReportViewer1.ReportSource = rpt;
Session.Add("report", rpt);
CrystalReportViewer1.RefreshReport();
}
}
}