Click to See Complete Forum and Search --> : [RESOLVED] multiple table in data report
kickent
Mar 27th, 2009, 09:15 PM
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.
Hack
Mar 28th, 2009, 06:49 AM
Moved To Reporting
wes4dbt
Mar 28th, 2009, 12:27 PM
If you need data from two tables in the parent command then you'll need to use a SQL statement. Like
select * from table1 inner join table2 on table1.somefield=table2.somefield
To refresh the dataenvironment you need to close the recordset, like
If dataenvironment1.rsCommand1.State = adStateOpen Then
dataenvironment1.rsCommand1.Close
End If
datareport1.show
kickent
Mar 30th, 2009, 10:51 PM
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???
wes4dbt
Mar 31st, 2009, 10:52 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.