• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 338
  • Last Modified:

Using Crystal Report X with Visual Basic 6.0 ? (With Source Code)

I am using Crystal Report X with Visual Basic 6.0 I am New To Crystal Report X Someone Please help me on How to Use Crystal Report X with VB6 also Give me code to display the Report
Please help me ASAP
1 Solution
Do you mean Crystal 10 or Crystal XI (which is 11)?

Look at this question

1. Drop the Crystal ActiveX viewer control on your form
2. Add the crystal report viewer library & designer runtime library as a reference (dependent on the version)

Add the following code:
 Dim myreport as string

    Dim crapp As CRAXDRT.Application
    Set crapp = New CRAXDRT.Application
    Dim report As CRAXDRT.report
     Dim crxRpt As CRAXDRT.report

  myreport = "C:\myreport.rpt" ' Change this to your report name & location
   Set report = crapp.OpenReport(myreport)
     CrViewer1.ReportSource = report  ' or whatever you called your activeX control    

There are a lot of other possibilities such as how to setup the activeX control, resizing the viewer to fit the screen, creating parameters and sending from VB, exporting, setting up a printer to use for the report. It depends on exactly what you need to do.

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now