|
-
Jun 4th, 2003, 09:03 AM
#1
Thread Starter
New Member
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
-
Jun 5th, 2003, 10:25 AM
#2
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|