One of the more common questions I get from Ripplestone users is how to change where the Crystal Report is getting the data from for the report. Or a related question is that after a report is published to Ripplestone it gets an error stating that the report can no longer find the data source. This is very common when the data source is a file based data source such as Microsoft Access, Excel or a dBase database.
First, let me step back an explain why Ripplestone will display the error when the report is published to Ripplestone. Then we can fix the report to make it work within Ripplestone.
When creating a report that uses a file base database or a file like Excel, the report will use a hard coded path to the file. In the screen shot below, the report is getting the Access database from a network share. This report will work great as long as it’s run from the local network and the user running the report has permissions to the network share. This is the location used to develop the report.
The problem is that when this report is published to Ripplestone, the Ripplestone server will also need to be able to access the database to refresh the report with current data. The Ripplestone web application also runs under the Network Service local account and that account will need permission granted to access the database.
In the following example, the report was published to a external web server that did not have access to the network share, so it would display an error within Ripplestone stating that the database could not be found.
To solve the problem the database location needed to be changed within the Crystal Report using the Set Database Location dialog box. The dialog box allows the report to be updated to a different database at a different location. In the above example the database was moved to the report server at D:\Data\TMS\Applications2009.mdb and the TMS folder was given permission to the Network Service user to read from the folder.
As you can see in the about screen shot I create a new database connection in the bottom half with the new database location and then pressed the Update button to update the main report and the sub-reports with the new database. I was then able to publish the updated Crystal Report to Ripplestone and the report will be able to location and report from the database in the D:\Data\TMS folder.