Multiple Starting points

Posted on 2004-11-12
Last Modified: 2008-01-09
How can I have multiple datasource in CR 9.

For ex. If I have tables linked as one datasource and if I define a SQL as another datasource, Then I get an error saying "More than one datasource is used....".

But I would like to have columns from both the datasource. They are different fields from different tables under different conditions.

Any inputs appreciated
Question by:gsuresh17
    LVL 100

    Accepted Solution

    Crystal recommends using subreports when multiple datasources are needed.

    LVL 26

    Expert Comment

    by:Kurt Reinhardt
    There are definitely issues when you attempt to join tables from different databases - even if the type of database is the same (two SQL Server Databases on the same machine will still give you fits).  While you can do it, your options for joins and fields are extremely limited as you found out.

    Subreports are definitely a viable option, but they might not be the most efficient.  The section in which the subreport is placed and the size and integrity of the tables used can definitely affect performace.  For example, if you place the subreport in the detail level of the master report and there are 5k detail lines in the report, then the subreport will be executed 5,000 times!  This can cause performance nightmares, both in Crystal and on the database.

    Other options you have are:

    1)  Link all of the tables in MS Access, then use Access as the sole datasource for the report
    2)  Create a View in your database - the databases can be joined in the View, which will be used as the sole database for the report
    3)  Create a Stored Procedure - the databases can be joined in the Procedure, which will be used as the sole database for the report
    4)  Create a SQL Command Object with Crystal Reports 9 - the databases can be joined in the Command, which will be used as the sole database for the report

    See some commonality between all of these solutions?  Different ways of accomplishing the same thing, but they can all be viable options.  The benefit to using any one of these solutions is that your performance is pretty much guaranteed to be better than if you use subreports.

    LVL 100

    Expert Comment

    Glad i could help


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now