If the Allow Multiple Data Sources setting is set to True, a Stonefield Query user can select which data source they want to run reports against. However, what if your users want to query against multiple data sources at the same time? For example, in an accounting system, there may be a different database for each company. If the user wants to query on several companies at the same time and include records from those companies in a particular report, turn the Allow Queries on Multiple Data Sources setting to True.

When this setting is True, Stonefield Query provides an additional control on the Filter page in the Reports Explorer and the report wizards which allows the user to select which data sources, in addition to the currently selected data source, are included in the selected report. When the user runs the report, Stonefield Query first performs the query against the current database. It then performs the query against the other selected data sources, combining all of the result sets into a single one, which is then output in the report.

To help the user identify which data source a particular record came from, Stonefield Query automatically adds a field called SOURCEDATABASE, with a caption of "Source Database" (replacing "Database" with the value of your Description for Data Sources setting) to each table. You won't see these fields in Stonefield Query Studio; they're added dynamically when Stonefield Query is started. This field contains the descriptive name of the data source a record came from. The user can sort or group on this field if they wish so records from the same data source are together, but cannot filter on this field (which wouldn't make sense anyway; they can simply remove undesired data sources from the list instead).

If the Allow Multiple Data Sources setting is set to False, the Allow Queries on Multiple Data Sources setting is set to False automatically and you cannot edit its value.

See also

Allow Multiple Data Sources | Configuration Settings