This article shows how to save a Crystal Reports data in PDF, Word and Excel formats with an ASP.NET button control.
This article shows how to save a Crystal Reports data in PDF, Word and Excel formats with an ASP.NET button control.The following is the procedure.
DATABASE SIDE First create a table in a SQL database for Employee Information.
STEP 2OPEN PROJECT IN VSSTEP 3Go to the Solution Explorer as in the following and add a new item as in Figure 1.Figure 1: Add New ItemFigure 2: Add Crystal ReportFigure 3: Select Report GalleryFigure 4: ADO Connection Figure 5: Select SQL Server Native Client Figure 6: Provide Database Connection InformationFigure 7: Connection InformationFigure 8: Select Created Procedure Figure 9: Choose Field Figure 10: Choose Report Display FormatFinally your Design Page is ready as in the following figure,Figure 11: Report Design FormatSTEP 4Go to Solution Explorer and add a new item.Figure 11: Add UI STEP 5Add a Report Viewer.Figure 12: Add Crystal ReportViewer Step 6UI Design SideNow we are adding a button control to the .aspx page and create a button control event.Then write report data export code for this new button event.You can see the design code below:
Programming ASP.NET MVC 5