• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 343
  • 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
0
SandeepBhambure
Asked:
SandeepBhambure
1 Solution
 
mlmccCommented:
Do you mean Crystal 10 or Crystal XI (which is 11)?

Look at this question
http://www.experts-exchange.com/Databases/Crystal_Reports/Q_21639411.html

mlmcc
0
 
woozlewightCommented:
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    
    CrViewer1.ViewReport


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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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