Friday, February 11, 2011

Add Export Button in Crystal Report Viewer

In a Visual Basic 6 program, using crystal report, there are times that you, as the programmer, wants to add export functionality from your crystal report. This means that once the user displays a report in the program, the user will be able to export the report to different file format, MS-Excel included. Observe the icons at the top of the crystal report as shown below. The export button is still not visible.

Now, in the visual basic project, click on the crystal report viewer control, and you will the properties, as shown below. You will see that the property EnableExportButton is set to False.

Set this property to true, see below.

Now, go back to the design view of the crystal report viewer, and you will see that the Export button is already enabled.


When you run the program that displays this report, you can click the new export button and you will shown with the screen below. With this screen, just follow the directions and you will be able to save the displayed report into the format you selected.

No comments:

Post a Comment