Crystal Reports and ASPX web pages

Oct 22 2018 3:05 PM
Hi All,
Does anyone have an updated version of adding a Crystal Report to an aspx page?  I followed the instructions on your site and my report still won't show on the web site page.
I'm running C# in an ASPX Web Solution
An expample of my C# code is:
 
ReportDocument crsrpt = null; 
 
 protected void Page_Load(object sender, EventArgs e)
{
btnShow.Text = "Show Report";
crsrpt = new ReportDocument();
crsrpt.Load(HostingEnvironment.MapPath("~/repos/DefJobTickets.rpt"));
CrystalReportViewer1.ReportSource = crsrpt;

}
protected void btnShow_Click(object sender, EventArgs e)
{
CrystalReportViewer1.ReportSource = crsrpt;
CrystalReportViewer1.Visible = true;

}
 
 
If anyone is interested in this, please let me know and maybe we can write an updated set of instructions, if anyone sees a need for it.
 
Thanks a bunch,
Bill Farrell  (NOT Will Farrell. I had the name first!)

Answers (2)