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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Changing datasource

Status
Not open for further replies.

janchan

Programmer
Feb 3, 2005
40
US
Hi,

we have configured our reports to use 2 datasources DB and WH. db uses the online database for on demand reports and wh is used for scheduled reports from the warehouse. is there a way we can change the database by just changing the datasource in the DB2 configuration? i.e. if we want to run the reports using database1, we just want to change the datasource(DB and WH) in DB2 configuration to database1 and warehouse1. on another day if we want reports from database2 and warehouse2, we just want to change the datasource DB and WH into changing anything in the BOE. i tried doing this, but somehow even after i change the datasource to database2, the report is still generated from database1. i opened the new instance of the report from the output folder in windows explorer. it shows the data from database1, but when i refresh i get the data from database2. is there a solution to this? we are using BOXI and IBM DB2.

thanks.
 
Hi,
if you are connecting via ODBC then you could change the db source to point to wh or vice versa.
I had a similar query about what info is retained by a scheduled instance (ie a recurring one) and what is not as the "Refresh" option under the report Properties is confusing. Below is an extract of the reply I got:

"When a report is published into CE, there are several types of objects created:

Report Objects - those are the physical files stored in the Input FRS. Report Objects contain the metadata which define the report, and parts of the metadata are migrated into Info Objects

Info Objects - the representation of report objects in CE repository. Info Objects contain database logon information, record selections, user options and data that CE retrieves when accessing reports.

Repository Objects - Objects CE share in common. Business Views and Formulas are examples of repository objects.

When you schedule a report to CE server and create a recurring schedule, Info Objects are created within CE. When you do a refresh on CE, the parent info object is updated in the repository, not the recurring-scheduled info objects. In the case of record selections, record selection properties in the info object are not updated as they are copied from the old version of the report info object. Refreshing reports in CE does not update the pre-created recurring-scheduled info object.

Since the Job server retrieves report objects from Input FRS every time the schedule runs, updates on the report metadata are reflected in subsequent recurring execution. For example, if you have added a field to the report, the report metadata is updated and therefore you will see the changes reflected in subsequent runs.
"

What it seems to be suggesting is that scheduled instances may pickup report layout changes but database logon information will only be picked up if you reschedule the report. When you are running the report on-demand it is picking up the new database information.

As a thought have you used the package option to bulk schedule report items as this could make this sort of re-schedule easier. Just a thought..

Apologies for the long answer but hope this clears it up a bit more.
ShortyA
 
Yes. we are using packages for scheduling the reports. when i open the instance from the server into the crystal designer and then refresh, it picks up the correct logon. is there are work around for this?
 
When you run the report via Crystal Reports (ie the designer) it will pick up the ODBC database settings at that point. However, a report that has been scheduled will not pick up changes to the ODBC database settings that have occurred since it was scheduled.

For example, if you schedule the report and at that point "myodbcsource" is pointing to "wh" in the ODBC setting but then the next day you change "myodbcsource" to point to the ODBC settings to point it to "db" the scheduled instance will not pick up that "myodbcsource" is now pointing to "db". You would have to reschedule the report in order for it to pick up the most recent version of the ODBC settings for "myodbcsource".

As a thought one of the APOS tools ( may allow you to bulk reschedule reports quickly. Perhaps have a look at their website.

ShortyA
 
Hi, thanks for the info. i did reschedule the report, but it still doesn't use the new source.
 
Are the ODBC database settings on both your report designing machine and the CE server the same ie datasource 1 points to wh on both machines ? Are you using a native DB2 driver of the Crystal DB2 driver ? Again are they the same on both machines ?

If you run the report via BOXI on-deman when it is pointing to database 1 I assume it picks up the correct database. When you update the data source to point to database 2 and then re-run the report on-demand via BOXI does it pick up database 2 ?

I have tried this with SQL Server connection via ODBC and it picks up the database change. Is this an issue with DB2 and are you pointing your report to ODBC ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top