Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. crystal reports

crystal reports

Scheduled Pinned Locked Moved Visual Basic
tutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    joypreeti
    wrote on last edited by
    #1

    i m fairly new to crystal reports.can anybody plz tell me how to use crystal reports in VB and how to pass parameters in the report at run time preeti

    J 2 Replies Last reply
    0
    • J joypreeti

      i m fairly new to crystal reports.can anybody plz tell me how to use crystal reports in VB and how to pass parameters in the report at run time preeti

      J Offline
      J Offline
      John Kuhn
      wrote on last edited by
      #2

      Although it might depend on which version of Crystal Reports you are using, there is something like a Parameters collection for report parameter variables, accessed with either an integer, (i.e., rpt.Parameters(1).Value = "XYZ") or the name of the parameter (i.e., rpt.Parameters("NAME").Value = "XYZ") all of which should be documented in the Crystal Reports documentation, but, if necessary, I can find the exact code I used last time I did this with CR 8.5. I'd have to experiment with CR 9.x+ to see if works the same way. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

      1 Reply Last reply
      0
      • J joypreeti

        i m fairly new to crystal reports.can anybody plz tell me how to use crystal reports in VB and how to pass parameters in the report at run time preeti

        J Offline
        J Offline
        John Kuhn
        wrote on last edited by
        #3

        OK, here's what I did in VB6 w/ Cr8.5:

        Set crystalApplication = New CRAXDDRT.Application
        Set crystalReport = crystalApplication.OpenReport(strReportFile, 1)
        With crystalReport
            .ExportOptions.DiskFileName = strExportFile
            .ExportOptions.DestinationType = crEDTDiskFile
            .ExportOptions.FormatType = crEFTWordForWindows ' crEFTPortableDocFormat
            .ExportOptions.WORDWExportAllPages = True
            .DisplayProgressDialog = False
            .ParameterFields(1).AddCurrentValue strGroupName
            ' .RecordSelectionFormula = strSelection
            .Export False
        End With
        Set crystalReport = Nothing
        Set crystalApplication = Nothing
        

        FYI, to the best of my knowledge, this requires CR 8.5 developer edition. What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups