Crystal Reports with Multiple Companies


I have a database with multiple companies and am wanting to write some crystal reports that the users can trigger. The problem I need to overcome before I even start to write the reports is how do I get the Crystal report to use the right table for the company it is being run from.

eg. If I am looking to run a report on Sales Invoice Lines - the table name will be different “company1$Sales Invoice line” or “company1$Sales Invoice line” depending on which company I need to run the report on.

Any help would be great



One of the ways to solve that issue is to create a view or to use stored procedures