Results 1 to 4 of 4

Thread: Crstal - Returning Filds from a Report

  1. #1

    Thread Starter
    Fanatic Member Bombdrop's Avatar
    Join Date
    Apr 2001
    Location
    St Helens, England, UK
    Posts
    667

    Unhappy Crstal - Returning Filds from a Report

    How can I extract a list of the fields from a Crystal Report so the appear say in a list box so that a user could select only the ones he\she wishes to see in there custom report. thanks

  2. #2
    Hyperactive Member
    Join Date
    Nov 2001
    Location
    Albany, NY
    Posts
    489
    This could be very complicated, Do you simply want to
    filter your recordset or do you want to SUPRESS fields
    through VB code? Both are probably possible.

  3. #3
    Hyperactive Member
    Join Date
    Nov 2001
    Location
    Albany, NY
    Posts
    489
    If you want a a list of Database fields then just
    query the database.

    If you want formula or parameter fields check this out....

    VB Code:
    1. Dim App1 As New CRAXDRT.Application
    2.     Dim Report As New CRAXDRT.Report
    3.  
    4. Set Report = App1.OpenReport(p_ReportPath & p_ReportFileName)
    5.  
    6.     Report.FormulaFields.Item(1).Name
    7.     Report.ParameterFields.Item(1).Name

    Since they are stored in collections you can
    loop through the collection to get all of the names.

  4. #4
    Hyperactive Member
    Join Date
    Nov 2001
    Location
    Albany, NY
    Posts
    489
    BombDrop - Please respond in further detail. This
    question really has me thinking and I would love
    to see if it works. I have an idea but I want to make
    sure we are on the right track before I put any more
    time into it. Let me know.

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