Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Crystal Reports 8.5 in Visual Basic 6.0

Status
Not open for further replies.

bidra

Programmer
Feb 28, 2002
31
DE
Hi,
I am working with VB6 and have lately installed Segate Crystal Reports 8.5.
To use a report in an VB application I went to the VB Project menu/Components looking for the Crystal Report Control but found Crystal Report Viewer Control instead.
Selecting it the Crystal Report Viewer was added to my
VB-toolbox. But this doesn't seem to be what I needed as it has no "ReportFileName" property, somthing what should be there as I already read in some other posts.
So, did I miss something in my installation or ist the Crystal Report Viewer the right thing ?

Thanx

Bidra




 
Right-Click in the project window, hover over Add to open the Add submenu, then choose CrystalReports8.5 (you can also access this from the project menu). This will bring up a wizard that lets you create a report using the standard Crystal Report Wizard, create a blank report, or load a report you have saved in crystal. After you create or select the report it will ask if you want to add a form containing the Crystal Report Viewer (The one you mentioned in your post) and if you want to make this form the startup object. Say yes to creating a form with the viewer, probably no on the other. A form will automatically be added to your project with the viewer object and the code to display your report on Form_Load, and the code to resize the viewer in the form's Form_Resize() event. At this point just showing the new form will bring up your report. Make sure 'Save Data with Report'(File Menu) is unchecked when you save the report you want to import in Crystal or the next question you will be asking is why your report always has old data. By double clicking on the Designer in the Project Window of your VB project you can edit the report through a Crystal Reports like interface without leaving VB. You can also save any changes you make in VB back to an .rpt file that can be loaded by crystal reports.

HTH Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top