Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2009
    Posts
    5

    Unanswered: Set the crystal report data source from vb6

    I have a project in vb6 with external crystal reports, i need to set the report data source dynamically through vb6

  2. #2
    Join Date
    Nov 2009
    Posts
    2
    vb source code for run *.rpt

  3. #3
    Join Date
    Nov 2009
    Posts
    2
    vb source code for run crystal report (*.rpt) file

  4. #4
    Join Date
    Nov 2009
    Posts
    9

    Lightbulb Setting the CR data source in VB6

    Your best approach is going to be instantiate a version of the your CR as an object within VB6. First you need to make sure that you can reference CR objects in your VB project so you may have to set up a CR reference to the CR dll. Once you've done that, you can then DIM a CR report object.

    Once you do that, you need to create an ADO recordset with the data that you want to print on the report. You can then set the CR data source (or record source or some property like that) to your ADO recordset and the CR will do its thing.

    I actually found it better to use this approach with VB6 to minimize the data crunching on the CR side. Do all your data manipulation on the VB side and give CR only the finished data it needs to generate the report. Hope this helps.

Posting Permissions

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