1.    10 Mar 2009 #1
    Moses Guest

    How to connect crystal report with vb 6.0


    Hi, Can you please help me with the step by step of connecting crystal report
    with vb 6.0. I tried to include CrystalPrintControl on the project and add
    the following code but gives me errors:

    Option Explicit
    Private m_objRS As New ADODB.Recordset
    Private m_objReport As CRAXDRT.Report
    Private m_objApp As New CRAXDRT.Application

    Private Sub Command1_Click()
    Dim cn As New ADODB.Connection
    Dim strSQL As String

    cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Program
    Files\VB98\NWIND.MDB"

    strSQL = "Select * From Customers"

    m_objRS.CursorLocation = adUseClient
    m_objRS.Open strSQL, cn, adOpenStatic

    Set m_objReport = m_objApp.OpenReport("F:\MyReport.rpt", 1)
    With m_objReport
    .Database.SetDataSource m_objRS, 3, 1
    .DiscardSavedData
    .ReadRecords
    End With

    With CRViewer1
    .ReportSource = m_objReport
    .ViewReport
    End With

    m_objRS.Close
    Set m_objRS = Nothing

    cn.Close
    Set cn = Nothing
    Set m_objReport = Nothing
    Set m_objApp = Nothing
    End SubIn this example I'm using
      My System SpecsSystem Spec

  2.    10 Mar 2009 #2
    Paul Randall Guest

    Re: How to connect crystal report with vb 6.0



    "Moses" <Moses@xxxxxx> wrote in message
    news:46488463-3727-467B-92E3-184A977A13BB@xxxxxx

    > Hi, Can you please help me with the step by step of connecting crystal
    > report
    > with vb 6.0. I tried to include CrystalPrintControl on the project and add
    > the following code but gives me errors:
    This newsgroup is named microsoft.public.scripting.vbscript.
    VB6 is NOT vbscript.
    Why not try a newsgroup with VB and CRYSTAL in it name, like
    microsoft.public.vb.crystal?
    Also, now that you know that there is a group with this name, you might
    try a groups.google.com search of that specific group.
    In the groups.google.com search box, type the following:
    crystal report vb6 group:microsoft.public.vb.crystal

    The first hit I get is How to use crystal report in VB6

    -Paul Randall


      My System SpecsSystem Spec


Similar Threads
Thread Forum
Adding the Custom Function (unicode string) to a Crystal Report display ???
hi, I try following url sample for Adding the Custom Function to a Crystal Report. ...
.NET General
CRystal report Visual basic 2005
Hi, inn a visual basic application (2005), i ' am trying to get the text of a (unbound) combobox into a textfield on a crystal report. Also i ...
.NET General
crystal report format text "vb.net"
Hi, I'am using "Visual Basic 2005" and Ado.net .Iin a crystal report i want to format a texfield as followed ###-#######-## and other string...
.NET General
Changing Crystal Report data source to a function
Hello, I like to generate a Crystal Report from my VB.NET code. This is how I would like to work: 1) Fill up a dataset with the data to be...
.NET General
Crystal report crash with exotic font
Hi, Yesterday I was facing a weird problem using Crystal Reports in VS2008. I have to make print label for supermarket products. They use an...
.NET General
V.Studio 2003 - unable to edit Crystal Report
Using V.Studio .net 2003 and .Net Framework v1.1, I have successfully created a number of Crystal Reports (v9.1.5 is bundled with it) that use the...
.NET General
Re: Passing Parameters to a Crystal Report with a Subreport
What version of Crystal are you using? I'm using 10. -- Cindy "marklar20@xxxxxx" wrote:
.NET General

Our Sites
  • Ten Forums
  • Eight Forums
  • Seven Forums
  • PC Help Forum
  • Help Me Bake
  • Site Links
  • Contact Us
  • Privacy and Cookies
  • About Us
    Windows Vista Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

    Designer Media Ltd
    All times are GMT -5. The time now is 20:46.
    .