Correcting Crystal Report Data Sources -- Tables not following Server - crystal-reports

Been struggling with this on a few Crystal Reports, and it's super evident when testing inside of the CR editor.
My report has one database connection (OLE DB to a a SQL Server). On the vast majority of my CR's, when I hit F5, and log into the SQL server for a data preview, the rest of the report will follow whatever database I select.
On some reports, it does not--and the tables in the underlying connection are stuck to a specific database.
Is this a setting within Crystal Reports for the tables below a connection to have their own "Catalog"?
I've found I'm able to correct this somewhat by changing each of the tables Catalog's manually, but I use these CRs against multiple databases.
Has anyone encountered this, and hopefully found a way to fix it without re-creating the report from scratch?

Try to verify the database. If this doesn't help try to update the connection to ODBC and back to OLDE DB.

Something else to try would be to click on Database in the menu bar, then click "Log On or Off Server". This will allow you to select a database server that the report is connected to and then Log Off from that connection, repeat this for all connected databases. Then click Database on the menu bar again and then click "Set Datasource Location" to update the report with the database you would like to use.

This usually works for me:
right click on database fields and left click on set datasource location.
some times you will need to update every table.
but most of the time - after making the connection to database you can update all tables automatically

Related

Add SQL command to report

I want to make a Crystal Report based on a SQL statement. I've read to do that, you add a command to the report, and to do that you have to connect to a database.
When I click the browse button I get the following screen:
Based on my research, it seems you connect to a database. As seen above, all of the file types are .xml files and all that shows up is Dataset. After I click on that, and right click on the dataset name node, the Add Command to Report is greyed out:
Normally you'd be able to add a custom SQL command by right clicking Add Command and selecting Add Command to Report However ADO.NET requires some unique steps in order to add the custom SQL. Instead you'll want to navigate here:
Create New Connection → OLE DB (ADO) → Microsoft OLE DB Provider for SQL Server
You'll of course supply the server information and pick the database.
After adding the connection:
1) Click the plus sign next to your connection.
2) Double-click the "Add Command" node.
3) Type in your SQL query, click ok.
Source: Crystal Reports 2016 Online Help chm file.
HTH,
aEon'

Crystal Report ODBC connection only shows "Add command"

I'm supposed to set up a crystal report for something less than exciting. This is my first experience using Crystal Reports (and its been agony).
When I add an ODBC connection, I put in the password (confirmed it works elsewhere) and press all the "Next" there are, and then I end up with this this:
I also am able to use a direct query when I do "add command" and can access the database tables that way, but this is less than ideal.
My understanding is that the tables from the database are supposed to be listed under my connection, but all I see is "add command"
Does this mean I am not connected to the Database?
How do I correct this?
Verify that the user you setup in the ODBC Data Source Administrator has access to those tables in the database.

Save Data Source in Crystal Server

I'm new to Crystal Reports/Crystal Server. Hope someone can enlighten me.
In SSRS, there's a thing called Shared Data Source wherein you can configure a data source like the server and database settings. This data source can then be used by multiple reports. This is very convenient especially if you would change the server name (ex: Production to UAT server) after some later time because you need to change it only on one place without modifying all the reports.
In Crystal Server, is there any equivalent? If not, what are the alternatives?
BTW, I'm using SAP Crystal Server 2013 and Crystal Reports 11.
Thanks in advance.
Edit: Saw this under Database > Set Datasource Location...
Can I save Datasource in Crystal and point all my reports thru this?
You can change data source by using Database-Set Datasource location from menu bar. From there it is pretty simple to change a reports datasource as long as you are changing to a database with same structure. If tables or fields don't exist you will receive an error. If field types used in the report do not match new data structure a mapping menu will appear.
So for example... I have several ODBC data sources which point to same server but different directories. Each directory has identical database structure but for different departments so all different data. I have setup each to be a favorite connection in database manager. I click database from menu bar, select Set Datasource. Select the current datasource. Select the new datasource and click update!
Very straight forward except for the items I mentioned in first paragraph.

Typing in password for every connected table from SQL Server 2008 R2 in Excel 2010 Powerpivot Addin

I've got a BI Dashboard in Excel 2010 using Powerpivot, which is connected to a number queried tables on one SQL Server. When the connections were setup, I checked the box to 'save password' on each one. However, whenever my users reopen the document and go to the Powerpivot window and select 'RefreshAll' then they have to type in the password multiple times (once for each table), which is not suitable.
I have looked here and here and seem to be experiencing the same issue as a number of other people. I have started again from scratch, ensuring that the 'save password' box is definitely checked on each connection string.
The only workaround I can think of is by user Windows Authentication, but this document is intended for widespread use, and as such this will require a lot of maintenance, and will really annoy my server admin :)
Does anyone have a workaround, or any way of resolving the problem?
This solution comes close, but doesn't seem to work in my case. Might work for others though...
Solution summary:
In the main Excel window in the Data tab, choose Connections, then select the workbook connection that corresponds to your PowerPivot connection. Click on Properties, switch to the definition tab, and mark “Save password” box.
Source:
http://cpa-it.com/password-not-saved-in-powerpivot-connection-when-using-sql-authentication/#comment-10654
I've found a workaround that works for me, but might not be an ideal solution for others.
In the main Excel window, you can create a new connection using a connection file (.odc). If you create this file on a shared network drive that all users can access, and select to store the password in the connection file, the password is -actually- stored.
You can then go on and use this connection in the PowerPivot window. It will no longer ask for a password when refreshing your tables.
Of course this is only a useful workaround within a company LAN, and if there are no security implications for storing the password on a fileserver in an odc file.

Crystal Reports - Add a new field to a stored procedure and make it available in the IDE?

I added a new field to a stored procedure.
How do I get it to be available in Crystal Reports without resetting the datasource in the database expert?
Verify Database works, but you have more control over things if you use the Set Datasource Location (found in Database > Set Datasource Location) to update the report after a proc change:
Open the Set Datasource Location dialogue (Database > Set Datasource Location).
Left click/select the procedure to update in the Current Data Source pane
Navigate to the procedure on the server to update with in the Replace with pane
Use the Current Connections leaf if you've already ran a report within the Crystal Reports Developer application. It can take a while for the pane to refresh.
Otherwise, navigate to the Create New Connection > [Database] leaf. If using Oracle, you will be prompted for the TNS, user and password for the connection
Click the now enabled Update button
This is where you set the Overridden Table Qualifier Name, which is essential for Oracle when a single report is to support multiple environments using the same TNS name.
Database Menu -> Verify Database
http://it.toolbox.com/blogs/programming-life/adding-new-fields-to-stored-procedure-and-updating-it-in-crystal-reports-30072
Click on Database -> Verify Database
Then right click on data source and refresh