|
-
Mar 6th, 2007, 09:18 AM
#1
Thread Starter
New Member
[RESOLVED] 2 database in 1 data report?
please help me,
i'm using vb 6
my report needs data using two database, how?
can you give me some examples
thanks in advance
-
Mar 6th, 2007, 09:52 AM
#2
Re: 2 database in 1 data report?
Welcome to the forums!
Depends on the nature of the data your getting from the 2 databases (eg. your doing a union or a join) and if you have access to db schema (eg. create linked tables) and if your setting up the data report progmatically or at desugn time (eg. data environment).
To get records from a table in another database http://www.vbforums.com/showthread.p...ghlight=select
-
Mar 6th, 2007, 10:01 AM
#3
Thread Starter
New Member
Re: 2 database in 1 data report?
im using data environment,
but i have problem in DataMember,
i want to use 2 database in 1 report?
is there a way?
-
Mar 6th, 2007, 10:13 AM
#4
Re: 2 database in 1 data report?
Depends what your getting from the two databases... this is not possible http://www.vbforums.com/showthread.p...ghlight=select because the data report is not a sophisticated (eg. compared to crystal)
There has to be a way to relate them or tie them up, eg. select join, select union. If there is a way to assign data from the 2 databases into one recordset (you will have to specify the SQL using SELECT...FROM...IN as demonstrated in link in post#2), then you can setup the data report through code http://www.vbforums.com/showthread.p...ataenvironment
Last edited by leinad31; Mar 6th, 2007 at 10:16 AM.
-
Mar 6th, 2007, 10:13 AM
#5
Re: 2 database in 1 data report?
Moved
What kind of databases?
-
Mar 6th, 2007, 10:24 AM
#6
Thread Starter
New Member
Re: 2 database in 1 data report?
microsoft access 2003,
2 databases, 2 recordset,
let's put it in this way...
dbA = database A
i have data from dbA, and i'm gettting data to my data report from dbA, and i have also data from dbB, how can i put the data in my data report with dbA and dbB...
in vb6 you can only choose 1 datamember..
please help me
-
Mar 6th, 2007, 08:06 PM
#7
Re: 2 database in 1 data report?
Not much information to work with, yes your trying to get data from 2 databases but what are the details?
Post the queries for data A and data B (assuming your querying them separately or creating separate reports), and indicate which columns are included in the report(A+B) and what is the sample output (or sample layout) of report(A+B).
Then we will see if its possible or not.
-
Mar 6th, 2007, 10:32 PM
#8
Thread Starter
New Member
-
Mar 6th, 2007, 11:17 PM
#9
Re: 2 database in 1 data report?
No need to query the other database, just total the premiums in current database using rptFunction control for data report. Place it in report footer section.
-
Mar 7th, 2007, 01:00 AM
#10
Thread Starter
New Member
Re: 2 database in 1 data report?
thank you very much daniel,
i really appreciate your help...
-
Mar 7th, 2007, 01:24 AM
#11
Re: 2 database in 1 data report?
Your welcome ^^ Please mark the thread as resolved if you no longer have any other questions. Thanks.
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
|