Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 26th, 2004, 01:26 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I understand your problem from the first post. But perhaps I have not made myself clear. From a database perspective you do not need to CONNECT TO multiple databases to get data FROM multiple databases if you can use a cross-database query (like in MS-SQL). You can connect to a SINGLE database and use SQL query that gets data from the other databases. From the perspective of the data consumer (Crystal Reports) you are connecting to a single database and getting a single result set. The inter-database communication is handled by the database engine.

Like I said before, I have not worked with Crystal reports, so I don't know what kind of limitations you have regarding the flexibility of the queries you use. But it seems that if you are limited when you connect to multiple databases and you can get the data with a single query to a single database, then it would stand to reason that if you only connect to a single database and specify a cross-database query then you have worked around the problem.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old February 26th, 2004, 02:14 PM
Registered User
 
Join Date: Feb 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. I see what you mean.
But I am not familar with the a cross-database query. Would you please tell me what the a cross-database query will be in this case.

Thanks

Ally

 
Old February 26th, 2004, 04:36 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I posted it above... but here is the syntax again. Obviously, you'll need to write it to suit your needs as I don't know what you are actually trying to query. The key is to prefix the table name with "DatabaseName..":

SELECT t1.[ID], t1.Description FROM DatabaseA..TableA2 AS t1
    UNION ALL
SELECT t2.[ID], t2.Description FROM DatabaseB..TableB2 AS t2
ORDER BY [ID]

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old February 26th, 2004, 05:19 PM
Registered User
 
Join Date: Feb 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actually I tried that. Somehow it didn't work.
Thanks anyway.


Ally

 
Old February 27th, 2004, 09:27 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

your problem is related to crystal report i think,
so try to do untyped crystal report and create a datasource and attach it to the report.

Ahmed Ali
Software Developer





Similar Threads
Thread Thread Starter Forum Replies Last Post
Is database necessary for generating report. radhekrishna BOOK: Professional Crystal Reports for VS.NET 0 January 8th, 2007 06:10 AM
Inserting Images Into Report From My database mms18 Crystal Reports 2 July 6th, 2006 02:25 AM
Database Report Generator K S Beale Need help with your homework? 0 June 7th, 2006 10:45 AM
Multiple Database in one report chriskhan2000 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 October 13th, 2004 09:39 AM
Crystal Report Database Connection winnie1778 Crystal Reports 2 October 15th, 2003 07:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.