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

Replacing multiple Tables with a single View

Status
Not open for further replies.

Siggy19

Technical User
Jan 6, 2003
141
US
In Crystal 8.5, I have a number of reports that use multiple tables (actually multiple linked views). I am replacing these queries with a single view for each report since this is MUCH faster in this particular environment.

However, while I can set the location of the multiple original views so that they all point to the same new one, Crystal seems to think that these all need to link to each other (although they are the same view now).

Any idea what the correct process is to do this sort of transition ?

Thanks,

Siggy.
 
You might verify the database first. After that you need to reestablish the details.
 
Imagine that the original Crystal report uses this query;

Code:
Select a.name, b.order_number
from client a inner join order b on a.client_id = b.client_id

and I want to replace the tables with a view that does the basic query.

In the report, it originally has two datasources (the Client and Order tables).

I have already set them both to point to the new view (call it VW_Client_Orders).

However, Crystal is still showing two 'tables' with them being automatically linked by all the fields. Similarly, the two fields used are still linked to the original tables (or at least to the new view using the original table name as the alias).

For the sake of simplicity, I would like Crystal to only show a single datasource and so I want to remove the other one (since they are both pointing to the same view now, it does not matter which I keep)

I cannot seem to remove the unnecessary extra datasource without having to replace the field with the equivilent field from the datasource that I keep. This is a pain ! In the example above, it is trivial but in the real world example I am working on, there are perhaps 100 fields that I would need to do this to and ensure that I preserve the position, formatting, any conditional expressions, any use in formulae etc.

Surely there is an easy way to do this.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top