Why doesn’t the “Set Location” work?

Wednesday 27 September 2006 @ 10:14 pm

The Set Datasource Location feature (called simply Set Location in older versions) allows you to point a Crystal Report to a different table or a different data connection. This is handy when you have several similar tables or when you have several different environments with the same structure. You can reuse the same report and simply point it to the new data. However there is one part of how this works that can be confusing, as was illustrated by a recent call I received from a customer.

He had 2 different views and he was trying to change the report from reading ViewA to now read ViewB. He followed the steps but when he was done the connection still said ViewA. He tried several times and finally called me to find out what he was doing wrong. I explained that even when the set the location changes to the new table, it doesn’t change that table’s alias which is a name associated with that table within the report. So in places like the Links tab of the Database Expert or in the Field Explorer you will still see the old table name. But if you run the report or look in the properties of the table you will see that it has in fact been changed.

In older versions there was a “Set Alias” command in the menu so it was obvious how you changed the alias of the table to match the name of the new table or view. Starting in v9 this menu command was removed. Now you change the alias of the table by opening the database expert, highlighting the name of the table in question and using F2 – just like you would to rename a file in Windows Explorer.

Leave a Reply

Recrystallize Pro