Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report disappears when a CR toolbar item is clicked
Message
From
18/05/2004 18:09:25
 
 
General information
Forum:
ASP.NET
Category:
Reporting
Miscellaneous
Thread ID:
00905109
Message ID:
00905111
Views:
15
>I have set the EnableViewState = true on the view but everytime I select an option off of the Crystal reports toolbar on the webform, the report disappears the Crystal Reports Viewer object displays the following information.
>
>CrystalReportViewer - CrystalReportViewer2
>Use the ReportSource or DataBindings property to specify a report source.
>
>
>What am I forgetting to do?

Okay, I have the answer add the code to the OnInit event.

override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);

// new report document object
ReportDocument oRpt = new ReportDocument();

string lcfile = Server.MapPath("HITTimeSheet.rpt") ;

// loading the ItemReport in report document
oRpt.Load(lcfile.ToString().Trim());

this.CrystalReportViewer2.ReportSource = oRpt;
}
Fred Lauckner

You know, it works on my computer. I don't know what your problem is.

.Net aint so bad.
Previous
Reply
Map
View

Click here to load this message in the networking platform