Results 1 to 2 of 2

Thread: DATA REPORTS Agggghhh

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Location
    Corner Brook
    Posts
    7

    DATA REPORTS Agggghhh

    anyway i need to create a data report in VB6 using Ado controls....

    its an tblemp and i am selecting jsut the FName and LName from the data base (for now) i have two text boxes and two lables on the Data report...

    I want to use all code....no data environment....if anyone could point me in the right direction or tell me where i could fiond out how to do this please tell.... thanks

    ps....searched the forums for a while and found nothing

  2. #2
    Member
    Join Date
    Feb 2003
    Location
    Cincy
    Posts
    55
    You can do this through JUST code, but yoy will have a DataEnvironment, but only used in code. You will not even know a data environment exists with the exception of just creating it, and using ADODC.

    visual basic code:--------------------------------------------------------------------------------
    If DataEnvironment1.rsCommand1.State = adStateOpen Then DataEnvironment1.rsCommand1.Close

    DataEnvironment1.Commands("Command1").CommandType = adCmdText
    DataEnvironment1.Commands("Command1").CommandText = "SELECT * from YourDB WHERE (Order# LIKE ""%" & Stryourstring & "%"")"

    DataEnvironment1.Command1
    DataReport1.DataMember = "Command1"
    DataReport1.Orientation = rptOrientLandscape
    DataReport1.Show
    'allows a refresh with new data without having to close the report first.
    DataReport1.Refresh
    --------------------------------------------------------------------------------

    You will have to create a Data environment, and create a data report.. I 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
  •  



Click Here to Expand Forum to Full Width