craxdrt application and selection formula

Posted on 2005-04-16
Medium Priority
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
  • 3
LVL 101

Accepted Solution

mlmcc earned 1400 total points
ID: 13797389
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

vidru earned 600 total points
ID: 13797408
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 101

Expert Comment

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

LVL 101

Expert Comment

ID: 13964541
Glad i could help


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Screencast - Getting to Know the Pipeline
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

864 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