craxdrt application and selection formula

Posted on 2005-04-16
Last Modified: 2008-02-01
I need to know what references I need in a vb application in order to use the craxdrt application.  I also need to know how to use a selection formula with the craxdrt?
Question by:tblock
    LVL 100

    Accepted Solution

    As I recall the references are

    Crystal Reports ActiveX Design and Runtime  - CRAXDRT.DLL
    Crystal Viewer

    To use the selection formula -  put this code on the CRViewer form.

    Option Explicit
        Private crApp As CRAXDRT.Application
        Private crRpt As CRAXDRT.Report
    '   Open report
        Set crApp = New CRAXDRT.Application

        Set crRpt = crApp.OpenReport(txtReportName, 1)
        crRpt.RecordSelectionFormula = "{Table.FieldName} = " & intVar.Value

    '   Set flags for CRViewer
        crRpt.MorePrintEngineErrorMessages = False
        crRpt.EnableParameterPrompting = False

    ' Set the viewer's report source to the Report object
        Me.rptCRViewer.ReportSource = crRpt

    LVL 13

    Assisted Solution

    Add a reference to the Crystal Reports [version] ActiveX Designer Run Time Library.  If this is for CR 10 or XI, the name of the reference is different, but similar enough that you'll be able to find it.

    The CRAXDRT.Report object has a RecordSelectionFormula property that you can set at runtime:

    crxRpt.RecordSelectionFormula = "{Table.Field} = '" & txtString.Text & "'"

    LVL 100

    Expert Comment

    My answer {13797389} or vidru's {13797408} should have helped.

    LVL 100

    Expert Comment

    Glad i could help


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    754 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

    20 Experts available now in Live!

    Get 1:1 Help Now