How to change new database name in crystal report - crystal-reports

I had created crystal report by using x database and i updated it to some other database i.e y (In i had added Some New Columns) by(Verify database and SET DATA SOURCE LOCATION ). I am Getting the old data which was in x database
Please give me some help Regarding This

1>wright click on Set Database Location option..
2>After selecting ur existing Database in crystal report select new connection for Database.
3>select new Database and click on update.
4>similarly update ur existing procedures/tables with procedures/tables of new database.

Related

Crystal Report || Unable to add Stored Procedure as Data Source in crystal rpeort

I have an old Crystal report which has a data source with some other database. I have added a few more columns in the stored procedure and trying to update the data source with the new server address.
When I am updating the data source through Database Menu -> Set Data Source Location and selecting New server (from replacing section) then it is not updating instead the older one is getting deleted.
Also I tried Field Explorer -> Database Fields -> right click choose Database Expert -> Select Connections from My Connections Box -> Select the procedure -> Click on the > button to add to selected table
In the above steps, I am not to add a particular stored procedure which I have modified and added 3 new columns. When I am trying to select any other stored procedure then it is allowing me to add. I tried to execute the procedure in the database and it is running without any issues and producing data results as expected.

Using Select query, nothing merges onto Crystal report

I have a Crystal template that I am modifying in developer because we are changing the datasource from an Access file to our Oracle DB. I created a database field that accurately connects to Oracle and added a select statement that because pulls a field from a particular table
select s.field from table s;
On the right hand side, under database fields, I see my command and can right click and browse the data, which right now returns two values.
I also made a formula field using an Azalea barcode function that calls the values (I think, this is where stuff is going wrong, I guess)
The formula field is
BarcodeC39ASCII({Command.field})
So this should take the data and format it into the barcode, except when I use print preview or print out the report, no data is merged.
I've tested this by creating a new formula field with just the Command.field, and still no data is merged. I imagine there is something really obvious that I am missing and would appreciate any input.
So unless I misunderstood your question, you are changing your datasource from Access DB to Oracle DB, correct? Assuming that the database structure remains the same then all you should need to do is go into Database -> Set Datasource Location and set the datasource location from the Access DB to the Oracle DB and your existing report should work as it did. You might have to map some fields, but that should be the extend of it. Is that what you are trying to do?
Chris

change relationship between tables in crystal reports after creating it

I have created a crystal report and imported 3 tables and also set relationship between them using Standard Report Creation Wizard. Now I want to change relationship between tables. But how can I change it? (e.g. how to start Standard Report Creation Wizard again?)
Database | Database Expert... to
adding and removing tables
changing table names
modifying linkage
creating a Command (a 'raw' SQL statement)
Database | Set Location... to:
change the data source (change from one database instance to another) for main and subreports
see the details of each table's connection
You use the Database Expert to do this. The place where you do this is easy to miss. There's another tab in the Database Expert that lets you view/modify links.
It's here:

How do I point Crystal Reports at a new database

I have a Crystal Reports 2008 user that has over 100 custom developed reports.
The reports all query Sql Server databases (SQL 2005).
This database server is getting replaced with a new system (running SQL 2008 R2) and the existing databases will be moved to the new server.
The new database server will have a different name (which I can address via the Crystal Reports Connections),
however, one of the applications is also being upgraded at the same time. The old database (DB_A) will be restored on the new server for historical reporting and a new database (DB_B) will be created.
The new DB_B will have a very similar schema, so I would expect that most of the Crystal Reports should be able to run against the new DB_B with little or no modification other than pointing the report definition at the new DB_B.
Of course, the majority of my users custom developed reports query against DB_A.
My question is: How do I modify existing Crystal Reports files to point at the new database name (DB_B) instead of the old database (DB_A) ?
Use the Database menu and "Set Datasource Location" menu option to change the name or location of each table in a report.
This works for changing the location of a database, changing to a new database, and changing the location or name of an individual table being used in your report.
To change the datasource connection, go the Database menu and click Set Datasource Location.
Change the Datasource Connection:
From the Current Data Source list (the top box), click once on the datasource connection that you want to change.
In the Replace with list (the bottom box), click once on the new datasource connection.
Click Update.
Change Individual Tables:
From the Current Data Source list (the top box), expand the datasource connection that you want to change.
Find the table for which you want to update the location or name.
In the Replace with list (the bottom box), expand the new datasource connection.
Find the new table you want to update to point to.
Click Update.
Note that if the table name has changed, the old table name will still appear in the Field Explorer even though it is now using the new table. (You can confirm this be looking at the Table Name of the table's properties in Current Data Source in Set Datasource Location. Screenshot http://i.imgur.com/gzGYVTZ.png) It's possible to rename the old table name to the new name from the context menu in Database Expert -> Selected Tables.
Change Subreports:
Repeat each of the above steps for any subreports you might have embedded in your report.
Close the Set Datasource Location window.
Any Commands or SQL Expressions:
Go to the Database menu and click Database Expert.
If the report designer used "Add Command" to write custom SQL it will be shown in the Selected Tables box on the right.
Right click that command and choose "Edit Command".
Check if that SQL is specifying a specific database. If so you might need to change it.
Close the Database Expert window.
In the Field Explorer pane on the right, right click any SQL Expressions.
Check if the SQL Expressions are specifying a specific database. If so you might need to change it also.
Save and close your Formula Editor window when you're done editing.
And try running the report again.
The key is to change the datasource connection first, then any tables you need to update, then the other stuff. The connection won't automatically change the tables underneath. Those tables are like goslings that've imprinted on the first large goose-like animal they see. They'll continue to bypass all reason and logic and go to where they've always gone unless you specifically manually change them.
To make it more convenient, here's a tip: You can "Show SQL Query" in the Database menu, and you'll see table names qualified with the database (like "Sales"."dbo"."Customers") for any tables that go straight to a specific database. That might make the hunting easier if you have a lot of stuff going on. When I tackled this problem I had to change each and every table to point to the new table in the new database.
Choose Database | Set Datasource Location... Select the database node (yellow-ish cylinder) of the current connection, then select the database node of the desired connection (you may need to authenticate), then click Update.
You will need to do this for the 'Subreports' nodes as well.
FYI, you can also do individual tables by selecting each individually, then choosing Update.

Crystal Reports Changing the Data Source

I have a Crystal report where the data source has originally been set to use ODBC connections. Now I want to modify the data source to instead use OLE DB instead of using ODBC. How do I replace the data source connection without breaking the database fields which I have originally set up for my report? If I try to delete the original data source, the fields which I have already set up are also deleted. Is there a way to map the report to use OLE DB instead of the ODBC connection?
Thanks.
Its easy. Right click on the database fields in your field explorer. Click on 'Set datasource location' And then you will see two sections in a dialog. "Current datasource" and "replace with". In the current datasource - select the object you want to replace. Then in the "Replace with" section click on "create new connection">"OLE DB">Connect to the database object that you want by supplying driver and credential information.
Then click the 'update' button on the right side. That's it! You're done. Though the object name might not seem to change in the 'current datasource' section, still if u click on the (+) sign next to the object, the source name will show the new OLEDB object that you used
Try:
Adding the OLE DB data source to the
report without deleting the ODBC
data source.
Use the Set Datasource
Location option (from the Database
menu in the Report Designer) to
change the datasource for the table
from the ODBC data source to the OLE
DB data source.
Then delete the ODBC data source from the report.
Crystal Report 8.5
Click 'Database' menu->Click 'Remove From Report'->Select the tables which you want to remove from the list->click 'Remove' option->Click 'Done'Button.
That's it:)