Link to home
Start Free TrialLog in
Avatar of Robert Silver
Robert SilverFlag for United States of America

asked on

What should I use in place of ReportDocument object in Crystal Reporting in a ASP .NET 2.0 Project?

Can anyone tel me a replacement object for the ReportDocument object in the code below please!!!!

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Text;
using CrystalDecisions.Web;
//using System.Web.Security;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

namespace Webtest1 {
    public partial class _Default : System.Web.UI.Page {
        protected void Page_Load(object sender, EventArgs e) {
            {
            ReportDocument rptDoc=new ReportDocument();
            CrystalDecisions.Web.CrystalReportViewer CrystalReportViewer1=new CrystalReportViewer();
            //rptDoc = New ReportDocument();

            rptDoc.FileName = string.Format(@"c:\\report1.rpt");
            //rptDoc.FileName = appPath & "\" & tmpNode.Text
             // false in line below is regarding  wheher or not to match upper or lowercase
            rptDoc.SetDatabaseLogon("myuser", password1", "hostname1", "MyDbName",false);
            rptDoc.VerifyDatabase();
            CrystalReportViewer1.ReportSource = rptDoc;
        }
        }
    }
}
Avatar of Mike McCracken
Mike McCracken

WHat problem are you having?

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of Dauhee
Dauhee
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial