Crystal Reports in vb

K

krishna murthy

Hi,

I have one doubt that is i have some report files i.e rpt
files.how to open the crystal reports from the Visual
basic applications.

Regards,
Krishna
 
M

Mona

Hi Krishna,

Using Crystal Reports in VB
When you have designed your report, the saved file should have an extension .rpt.
You can use this report with the Crystal Report control to display or print your report in a VB application.
Note:Check the crystal report help files for the files you need to distribute with the control. You will also
need any .rpt files that you have created You will have to add the Crystal Report control to the toolbox,
this is done by going to the Project menu and selecting Components, then looking down the list for the
control and clicking on it
To use the control add it to a form and set the following properties

a.. ReportFileName - The path and the filename of the .rpt file you have created
b.. DataFiles(0) - The path and the filename of the database that you want it to use.
If this is left blank it will use the one in the report.
c.. SelectionFormula - The formula to select the subset of data that you want.
d.. Destination - 0 to Preview, 1 to Print
To display the report use the .printreport method i.e CrystalReport1.PrintReport

HTH

Mona
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top