I created a crytal report absolutely blank in my project.....
And add the following coding on the page load ()of the page:
using
public
{
BindReport();
}
reportDoc =
reportDoc.Load(reportPath);
cmd.Parameters.Add(
conn.Open();
daTest.Fill(dsTest,
CrystalReportViewer1.Visible =
reportDoc.SetDataSource(dsTest);
CrystalReportViewer1.ReportSource = reportDoc;
reportDoc.Close();
reportDoc.Dispose();
But i m continuosly getting the error :
CrystalDecisions.CrystalReports.Engine.DataSourceException was unhandled by user code Message="The report has no tables." Source="CrystalDecisions.CrystalReports.Engine" StackTrace: at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type) at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet) at _Default.BindReport() in c:\Inetpub\wwwroot\TryReport\Default.aspx.cs:line 49 at _Default.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\TryReport\Default.aspx.cs:line 22 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Please help me as soon as possible....