You can get a “Class not registered” error when you click on the database menu item in Crystal.
This error is showing because the Database registered for use in the report is not available to you as a user. Of course – to change the database, you need to go into the database menu, and that’s a catch 22 situation right there. There is a way around it though :
- Click Report – “Report Expert”
(You’ll get a warning message saying that this will overwrite your report. It will if you follow the wizard all the way through – but luckily, we’re not going to do that.) - Choose on data table in the list and click “Database”
- Click “More Data Sources”
- Click OLE DB
- “Make New Connection”
- SQL Server – Native Client 11
- Click Next
- Enter your SQL Database details and Click OK
- Find the table that’s not already in the report and click “Add”. (We’ll remove it later)
- Click Close, and then when the TopNReport Expert is shown to you, click the [X] Close button.
- You can now click into Database.
- Go into “Database” and change the database location.
- Once this has been changed, you can remove the tables added above from the report.
Simply –
- Use report expert to add a new table.
- Use Database Location to update the location of the report.
- Use Database –> Remove from report to remove the report.
Finally
- You will need to do this for all reports, and subreports.