Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report connect to unknow database ???

Status
Not open for further replies.

takume

Programmer
Mar 15, 2004
9
HK
Currently, we are using CR 9.0 Advanced. We encounter a problem when we are generating the report. The scenario as follows:

1. We created a report which connected to our development database (e.g database name "A" )(SQL 2000) and the report fields are injected from stored procedure created on datbase. It works fine when we are previewing the report or call the report from VB.

2. However, when we deploy this report to user testing environment which connected to database name "B" (with the same schema and store procedures) and call up the report from VB the report have no data. We recognize that the CR9 may remembered the setting of our development setting which pointed to database name "A".

We are wondering do we need to create the report again and pointed to database name "B" ? because it waste us lot of time to drag the field again. Any solutions or suggestions ? or anything we need to do in VB programming when we call up the report ? Many Thanks
 
How are you supplying the data to the report?

Text descriptions are helpful, but technical information is critical, of which you've supplied very little.

Are you dynamically creating this report?

Since you're using an SP, I'll assume that you are embedding the data source in the report, which means that you'd need to open th report and use Database->Set Location to repoint it at the new source.

An alternative would be to generate the data source in VB and pass it to the report using an ADO recordset.

Here's a link that should give you the basics:


-k
 
Hi synapsevampire, as you said we are creating the report and embedded the database source while we create the report and inject the store procedures. Then we just simply drag the field onto the report. From our VB program, we just simply call up the report then it return us the result. We didn't use set datasource but we did use setLogOnInfo.

I can said that it work fine for us when we develop the report under our testing environment (database A) but after we finish it and copy those reports to user testing environment which connected to database B (same schema as A only the name is different). Then the report not work EVEN we opened the report and set the database location to database B. At the end, we need to drag all fields again in order to make it work...?? isn't it wasting time to do the same things again ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top