Skip to main content

Connect Crystal reports (Hosted by Access)

Create a database connection for Crystal Reports Developer report writer for Hosted customers.

H
Written by Harry Ledger
Updated over 2 months ago

This guide explains how to create a database connection in Crystal Reports Developer Report Writer for hosted clients.

Double check the database you should be connecting to

  1. Open the Admin tool

  2. Click Database Manager

  3. Note the SQL instance name.

  4. Return to Crystal to confirm if this SQL instance is set up as an existing connection.



From the Access Gateway

  1. Launch Crystal Reports.

  2. To create a new report, select File Menu, New, Blank Report. A Database Exert window appears.

  3. Click Create New Connection, OLE DB (ADO).

  4. Select Microsoft OLE DB Provider for SQL as the Provider.

  5. Enter the Server name. This can be found on the Admin tool in the Database Manager area.

  6. Select Integrated Security.

  7. Select the HR Database. This can be found on the Admin tool in the Database Manager area.

  8. Click Finish. A new connection to the HR database has now been created.

When starting a new report click on Current Connections.


Expand the schemas within the connection, double-clicking tables to include them in the report.
​



A Crystal report may be returning data from the test system rather than live, this common issue is caused when a Crystal report has been built and tested with the Test environment.


The connection details associated with the Crystal report will need updating.
​
To ensure the Crystal report uses the correct databases, follow these steps:

  1. Note the SQL instance and Database from the Database Manager area of the Admin tool.

  2. In the Admin tool, navigate to the Document store.

  3. Locate the report and right-click and select Edit.

  4. Note: Ensure the Crystal report is unlocked. Clicking Edit will open the Crystal report in Crystal Designer.

  5. In Crystal Designer, click Database.

  6. Click Set Database Location.

  7. Click Current Connections.

  8. If the live database is already stored as a connection, go to step 13.

  9. If the connection is not to the live database, this will need to be added, click Create New Connection.

  10. Scroll to and select OLE DB (ADO).

  11. Scroll to and select Microsoft OLE DB Provider for SQL Server.

  12. Enter the details for the server and CLOUD credentials.

  13. Once complete, highlight the new connection under OLE DB (ADO).

  14. On the right, click Update.

  15. Click Close. The report can now be saved and updated where necessary.


If your connection already exists and you are unable toUpdate a view or table from one Database to another, you may need to remove this from the report and re-add it by following these steps.


Remove and replace tables and views in Crystal

  1. Click Database.

  2. Click Database Expert.

  3. Expand the SQL instance you require (new connection).

  4. Expand the Database to show all schemas.

  5. Find the equivalent tables and views in the left hand pane, using the existing Selected Tables section.

  6. Highlight them and click the right arrow to include them.

  7. A prompt will appear saying: The table 'Yourtablename' has already been added to this report with alias 'Yourtablename'. Do you really want to add another alias to this table?

  8. Click Yes. - You'll see the table/view appear under the Selected tables section under the new connection's SQL instance, with an _1 appended to it.

  9. You can now highlight the table/view from the old connection, clicking the left arrow to remove it.

  10. Repeat step 6 - Add the correct table again from the left hand pane. - It will appear this time without the _1.

  11. Remove the duplicate _1 table from the Selected table section.

This method ensures you do not remove a table before first replacing it with an appropriately named alternative, preventing you from losing any table/view.
You may need to re-build the report as all the tables and views have been replaced rather than updating the connection.
​
If this does not work for you, you can also try this alternate method.


Modify the SQL generated by using the Add Command functionality:

  1. Click Database.

  2. Click Show SQL Query.

  3. Copy the SQL generated.

  4. Click Database.

  5. Click Database Expert.

  6. Locate your Data Source and open the database folder

  7. Select Add command (top of the list) and add to selected tables by clicking on the right arrow. This opens the Add Command To Report window

  8. Paste the SQL generated;

  9. Modify the SQL as required and click OK - replacing the SQL instance names in all places.

  10. To rename the table, select and press F2

  11. Go to the Links tab and check the relationships

  12. Create the new report using the new table.


Change the Cloud account you are logging in with

  1. Navigate to the Access Hosting website (RDWeb) and click onto SAP Crystal Reports 2016

  2. click on the downloaded connection file and select More choices

  3. if this is not available close the connection and then right click on the same connection file

  4. Select Edit, this will reset the credentials

  5. Select Close

  6. Left Click the connection file and once again select More Choices

  7. Select use a different account

  8. Enter your alternative cloud credentials

  9. click OK

Did this answer your question?