Results 1 to 2 of 2

Thread: VB6 DataReport

  1. #1
    Join Date
    Nov 2003
    Location
    Bucharest, Romania
    Posts
    17

    Unanswered: VB6 DataReport

    Hi,

    I am new to using DataReports, though not new to VB. I want to build the SQL statement (displayed by the DataReport) PROGRAMATICALLY - what is the proper code to do that ?

    I HAVE created a DataEnvironment, Connection and Command, but my report says it can't get recordsets from datasource.

    My code is :

    [Dim Sca As String

    Sca = "SELECT ProjectId, Denumire, Mentiuni FROM AProject"

    DataEnvRep.Commands(1).CommandType = adCmdText
    DataEnvRep.Commands(1).CommandText = Sca

    RepFactEmisa.DataMember = "cmdRep"
    RepFactEmisa.Show]

    where Rep... is the report, Data... is the DatEnv, cmdRep the command

    Cheers

  2. #2
    Join Date
    May 2004
    Posts
    16

    test this

    try this....

    Open your recordset again
    set your record set to data report and refresh it before showing

    good luck

Posting Permissions

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