Results 1 to 3 of 3

Thread: Crystal

  1. #1
    Guest

    Post

    I have created my first crystal report and now want to access it through VB.

    I have added the Crystal Reports component

    I have dimmed as a Crystal Report

    Do I now use the set command to point the program to my report?

    Code:
    Dim NameGraph As CrystalReport
    Set NameGraph = "c:\reports\eventnamegraph.rpt"
    This gives me a type mismatch error.

    Thanks in advance


    ------------------
    Boothman
    There is a war out there and it is about who controls the information, it's all about the information.

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363

    Post

    Boothman,
    Here's an example. The printreport method generates a print preview by default. The formula examples aren't needed unless you want to dynamically pass formula values.

    Code:
    With crystlrpt1
            .ReportFileName = App.Path & "/rptMain.rpt"
            .Formulas(0) = "fTitle= 'Computer Service/Request Management'"
            .Formulas(1) = "fSortBy= '" & sSortMsg & "'"
            .Formulas(2) = "fFilterBy= '" & sFilterMsg & "'"
            .PrintReport
        End With
    Regards,
    Wade

  3. #3
    Guest

    Post

    What I would like to do is pass a date range for my report. The dates are @FromDate and @ToDate (self-explanitory).
    Then I would like to generate the report based on that information.
    Thanks.

    ------------------
    Boothman
    There is a war out there and it is about who controls the information, it's all about the information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width