Search code examples
crystal-reports

Crystal Reports Data Source Change Graph Disappear


So I have a crystal report that uses database X and I would like it to use database Y. However, the crystal report that uses database X has graph that relies on [X].dbo.supplier_name. Then in database Y the "supplier_name" field then maps to "SupplierName".

This means that once I change the datasource to map to database Y, the graph is instantly deleted because it cannot find supplier_name. Then when I try to copy the graph over from the original report to the new report I receive and error saying:

"The report object(s) selected cannot be pasted across reports." ... "The field supplier_name does not exist in the database of this report"

Does anyone know how I can map the graph to look at SupplierName of the new database so it will not delete it upon changing the datasource?

Otherwise is there some way that I can copy the graph over?

Thanks.


Solution

  • A few thoughts come to mind - the easiest, and fastest, is to create a formula on the existing report (call it Supplier). Inside the formula, add the Supplier_Name field

    Alter the graph to use this formula instead of the Supplier_Name field. Copy the graph from the report and paste it into the new report - It will create the formula in the new report automatically. Open the formula on the new report and replace the field with "SupplierName"