-
Mar 27th, 2009, 09:15 PM
#1
Thread Starter
Member
[RESOLVED] multiple table in data report
im using vb6..i want to use data from 2 different table using data environment. i already use command child to add another table, but feilds from 2nd table cannot drag into data report.
another problem is how to refresh/update data report since i have to close and restart my application.
-
Mar 28th, 2009, 06:49 AM
#2
Re: multiple table in data report
-
Mar 28th, 2009, 12:27 PM
#3
Re: multiple table in data report
If you need data from two tables in the parent command then you'll need to use a SQL statement. Like
Code:
select * from table1 inner join table2 on table1.somefield=table2.somefield
To refresh the dataenvironment you need to close the recordset, like
Code:
If dataenvironment1.rsCommand1.State = adStateOpen Then
dataenvironment1.rsCommand1.Close
End If
datareport1.show
-
Mar 30th, 2009, 10:51 PM
#4
Thread Starter
Member
Re: multiple table in data report
i have problem using SQL query..
select * from borrow inner join staff on borrow.bookID=staff.ID
this is my link....but both my table has fields such state and borrowBook.
so fields under command(in data environment) will write as borrow.state,borrow.borrowBook, staff.state,staff.borrowBook and the ID's...
when run the data report form, error will displayed "borrow.state not find"
is there any way so i can set such borrow.state as borrow only ??
or i have to redesign my database???
-
Mar 31st, 2009, 10:52 AM
#5
Re: multiple table in data report
Since you changed the DE you'll have to delete the text boxes on the report like "state" and then drag and drop the new "borrow.state" from the DE.
-
Dec 8th, 2016, 02:30 AM
#6
Registered User
Re: [RESOLVED] multiple table in data report
I am trying to prepare a data report basing on two linked tables. Even though I used parent command and child command structure, i could not get fields form two tables, but I am getting fields from only one table in the Datareport
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
|