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

Posted on 2006-06-02
Last Modified: 2013-11-25
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
Question by:SandeepBhambure
    LVL 100

    Expert Comment

    Do you mean Crystal 10 or Crystal XI (which is 11)?

    Look at this question

    LVL 1

    Accepted Solution

    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
         Dim crxRpt As

      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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now