Link to home
Create AccountLog in
Avatar of pm620wh
pm620whFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Crystal Reports - Gathering data from multiple servers to consolidate to a single report


I've been asked to create a report that consolidates data from a number of database servers for a single view using Crystal.  

I've used Crystal Reports for many years but mainly with Visual Studio and I'm used to automating tasks with code (For example, I would create the above report in code by populating a dataset with the data from each server and then passing the final dataset to the report).  

I would like to know if I can create a report using Crystal that gathers data from multiple servers without having to program my way around it.

So my question is, can a Crystal Report collect data from a number of database servers to create a single view or, do I need to either code this up or, do I need to use something like a Crystal Reporting server?

Please let me know if you need more information - thank you
Avatar of Mike McCracken
Mike McCracken

Crystal can do it but it will probably be a bit slow.  As far as I know you won't be able to change the sources from code since multiple sources is not totally supported.

You can add multiple sources to the report and link them as needed.
A command is probably the best method.  You will need a command for each data source.

Any chance you could use one source and create linked tables in it to the other sources? At least in that way the joining would be on a database server rather than a client workstation.

You could also build the recordset in code and use the PUSH method to give the data to the report.
Here is a link describing the method

What kind of database servers - SQLServer, Oracle ... ? All databases can get SQL from another database or server. You can prepare a stored procedure in one of them , which is going to retrieve and consolidate the data from all the servers in one view and then use Crystal reports against this view. This will be a regular report against one view. There are different waysto handle the consolidation. For example in SQLServer you can create linked servers and directly address the tables

select a,b,c FROM server1.database1.schema1.table1
select a,b,c FROM server2.database2.schema2.table2

Therare are also other options to get data from different servers. What type of database do you have ?
If you can link to all these servers from tools such as MS Access, or SQL Server you can create a UNION query/view that consolidates the data to a single data set.

Alternatively, at least one of the 3rd-party Crystal Reports desktop schedulers listed at allows you to automate the process of:
1. running a report (re-pointing it to a specified server) and exporting via ODBC to a table in a specified database.  That first step would use an option to discard the old data if the target table already exists.
2. Repeating the process with the other servers but now Appending the data to the existing table.
3. Run a different report that uses the consolidated data in the table.
Avatar of pm620wh


Hi Everyone

Thank you for your replies; it certainly looks possible from what you have all written.  Some additional context would be helpful I think:

The system I am reading data from is closed.  The database is Informix but an old version and the servers were not built to be queried aggressively by remote systems (they're security systems used for opening doors when security access cards are swiped - we're tracking the last time a card was swiped at a given door).  

We have tried historically to perform more complex queries against the servers and the queries time out.  We can't place triggers in the databases as this would invalidate support from the supplier as we would be making unauthorised changes to a closed system.

So whatever I do that's clever needs to be in the report or local to the reporting workstation.  If you have any additional advice or guidance based on this I would be grateful.

Avatar of vasto
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of pm620wh


Hi Vasto

Thank you for your comment - are suggesting a union (via Access) of the tables and then accessing that query via Crystal?  

I fully understand your approach, just wanted to qualify what I think in the (almost) final step.


Yes , Access union will work perform better and will be simpler than Crystal union. Access is not a database fro big amount of data, so if you can replace it with SQLServer or something else will be even better, but Access is a better choice than Crystal to process the data.