I've got an ASP.NET application that uses a half dozen crystal reports. It's in VB not C#, but you should be able to follow it since the basic premise requires little code.
The way I did it is...
Create a report(s) in the project. Then add a webform with the crystalreportviewer control. In the PageInit() event (might be called something else in c#) enter the following code to bind the report to the viewer:
CrystalReportViewer1.Reportsource = new CrystalReport1
CrystalReportViewer1.DataBind
You can also set the SelectionFormula on the viewer control.
That's it!
You can load/bind reports in other ways - see the Crystal documentation in Visual Studio - but I prefer this approach.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.