PDA

Click to See Complete Forum and Search --> : Crystal Report Control 4.6


nmretd
Dec 16th, 1999, 06:52 PM
I am looking to chart data which I have accessed from a Database. Somebody has recommended using the crystal report 4.6 control.

Can anyone give me a quick demo on how to use this control ?

Forest Dragon
Dec 17th, 1999, 11:55 AM
You need to build a chart report with the CrystalReports (the program) and then print it from Visual Basic by using the activex control.

Start CrystalReports, select File/New and then select "Graph" from the CrystalReports gallery. Follow the instructions and build your report. Save it by selecting File/Save.

Start Visual Basic and create a new project.
Select Project/Components and mark the "Crystal Report Control 4.6" in order to add it to the toolbox. Create a form and add this control to it. Set the control's ReportFileName property to the name of the report file you previously made.

In your code, when you want to show the report, use this line:

CrystalReport1.Action=1

The report will be shown on your screen, printed on the printer, exported to a file or sent by e-mail, according to the value of the Destination property (0: Window, 1: Printer, 2: File, 3: E-mail).

If you want more explanations, post.