answersLogoWhite

0

What version of Crystal reports?

Assumptions:

  • If you have Crystal Reports installed on the development machine, then you will already have all the dll's required for your VB6 project.
  • You're using Crystal Reports v8 or v8.5.
  • You will name the crystal report object 'rpt'.

Configuring the project:

  • In your VB6 project, Select 'Project'->'Components' and check the checkbox for 'Crystal Report Control' and click 'OK'
  • Open the 'Form' view for the form you are coding and drag the 'Crystal' control onto the form.

Coding the project:

  • You can now reference the 'Crystal' object from within your code. Take note of the name of the report object, or change it to something useful.
  • Set the WindowTitle, Connect, ReportFileName and SQLQuery properties to values relevant to your setup.
  • Optionally, you can set the following values: (DiscardSavedData [I recommend setting this to True as it speeds things up in most cases; in fact, I recommend saving your crystal files without any saved data in the first place.], ProgressDialog, and if you have Formulas in the report that you wish to pass in, you can do so using the Formulas(x) property.
  • Once all properties are set, launch the report using the following code:

"rpt.Action = 1"

Sample code:

rpt.WindowTitle = Me.Caption

rpt.Connect = "[Insert ADO Connection String here]"

rpt.ReportFileName = sReportsDirectory + "\SomeReport.rpt"

rpt.DiscardSavedData = True

rpt.ProgressDialog = True

rpt.SQLQuery = "select field1, field2, field3 from tbl1 where field4 = 'Y'"

rpt.Action = 1

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How can you print reports by vb6 using Crystal Report?

is : CrystalReport1.Reset CrystalReport1.ReportFileName="MyReport.rpt" CrystalReport1.Destination=(Printer) CrystalReport1.Action=6 CrystalReport1.DiscardSaveData=True


You wants to print a single record in crystal report using vb6 but you don't where and how you write query to retreive single from database?

As you enter Visual Basics select windows form applications. Name form, select single or multiple. After selecting what sort of form you like to create proceed to link your contacts page or table to database. Apply filter query and select printer action.


Difference between Crystal Reports and data report in visual basic?

Data report it reports data .. Crystal report it reports crystal thanks GENIUS


Which reports are easy to create rdlc or crystal report in asp.net?

The reports are easier to create iin crystal report.


What is difference between vb5 vb6?

VB6 is a more recent and more advanced version of visual basic.


What is the name of a book which explains how to create a report with Crystal Reports 10?

There are a few books that are available to explain how to create a report with Crystal Reports 10. One such book would be Creating a Report with Crystal Report 10 - For Dummies. This book can be purchased at a local book store such as Chapters or online at websites like Amazon or eBay.


How do you convert vb6 to dmg?

A .vb6 file is visual basic 6 source code, sometimes with it are .frm files that you would need. A .dmg is a Macintosh binary. you would have to find a program to compile the vb6 code to a Macintosh binary.


How do you install crystal reports for php?

how to create report in php


How can you execute a new line in VB6?

vbNewLine


Differences butween the vb6 asnd vbnet?

Please refer the following link, there you can find useful information about differences between VB6 and VB .NET


Free vb6 source code download for submission?

thanks


How do you make a cp trainer with free member?

use vb6