I’m probably too late for a chance to be generous, but I’ll give an answer anyway.
If you use Crystal Report directly or using Crystal Enterprise, then the only way I can do this is to use dsn as references to paulmorriss. The disadvantage of this is that you will use ODBC, which, in my opinion, is generally slower and considered obsolete.
If you use this in an application, you can simply change the database connection settings in code. Then everyone can develop a report against their own test database, and you can point it to the production database at run time (provided that the developers database is updated and contains the same fields as the production database).
To do this, you must use the following function:
private void SetDBLogonForReport(CrystalDecisions.Shared.ConnectionInfo connectionInfo, CrystalDecisions.CrystalReports.Engine.ReportDocument reportDocument) { CrystalDecisions.CrystalReports.Engine.Tables tables = reportDocument.Database.Tables; foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables) { CrystalDecisions.Shared.TableLogOnInfo tableLogonInfo = table.LogOnInfo; tableLogonInfo.ConnectionInfo = connectionInfo; table.ApplyLogOnInfo(tableLogonInfo); } }
To do this, you need to pass a ConnectionInfo object (which will contain all your registration information) and a report document to which it will be applied. Hope this helps.
EDIT . Another option that I can't believe that I still haven't thought about is that if you use SQL Server, you can make sure that all the development database names are the same, then use ".". or "(local)" for the server and integrated security so that each user has local information about the same connection. I think this is probably the best way to make the assumption that you can force all developers to use the same setting.
EDIT Again :) After reading some comments on the other answers, I think I may have misunderstood this question. There is no reason why I can think about why you can’t take steps in Arvo’s answer outside of the lack of rights to edit the report, but I assume that you could make other changes, so I doubt it is. I assumed that in order for the report to work for each developer, you did all these steps.