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.
Related
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
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'
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.
The first dialog box you get when opening SSMS (mine is 2008 R2) allows you to choose which server you want to connect to.
I had at least six servers in that list, including a local server called something like MYPC/SQLSERVEREXPRESS
Windows Updates ran last night and rebooted my machine, and now my SSMS list of servers is gone. I can select (local) or (browse for more)
What happened to my previously saved servers and their saved login info?
The file that stores these for 2008 is found at c:\%UserProfile%\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin
My guess is that it is still there, but was overwritten by one of your updates, you can check it to see when it was last modified.
You should make use of registered servers and export the file to save time if this happens again.
As I understand, you want to retrieve your credentials from that file.
There is a way to restore your passwords, if you still have sqlstudio.bin file and you can see "password" entries there.
First, some theory: When SSMS saves connection object it encrypts the password using some encryprion method, that is BOUND to your windows login. If you try to copy the sqlstudio.bin to other machine/user profile, passwords will not be decrypted. So it is important that you do all actions under same windows account, that you have used then sqlstudio.bin was generated. I can not tell you, if you can directly manipulate sqlstudio.bin - I suppose there are some checksums there which will prohibit direct manipulation, but there is another way.
I know the information I written above, because I develop myself an add-in for SSMS - SSMSBoost. I have implemented there the logic to manage preferred connections (so that you actually will not need standard dialogue anymore). I use exactly the same SSMS objects to store connections and serialize then into XML, so it is easier to manipulate.The picture below shows contents of sqlstudio.bin and SSMSBoostSettings.xml for the same connections. You can recognize, that username and password binary data are the same. So, to restore your password you have to:
install ssmsboost
add preferred connection to ANY database with sql server security
open SSMSBoostSettings.xml (you will see the path to that file in settings dialogue, after you have saved settings. Just save, close and re-open it. Path is displayed at the bottom)
Close SSMS, open sqlstudio.bin and ssmsboostsettings.xml in editor
modify entry in ssmsboostsettings.xml - enter data of your server from sqlstudio.bin - adress, database name, username. Carefully copy password data.
save xml and open SSMS - SSMSBoost will now show your connection in preferred connections and you will be able to connect to database. (see second picture)
We are experimenting with Crystal Reports viewers such as this one:
http://www.thereportviewer.com/
... which can actually re-connect to the data source and re-run a Crystal Reports RPT file with live data.
However when running the report the viewer asks for a password to connect to the data source (in this case SQL Server).
Does Crystal Reports have some way of embedding a connection password into a RPT file to avoid this? Or should I be using a System DSN from the Control Panel/ODBC thing to get around this?
I figure someone else must have had this problem.
You can't do that. If possible set the password in the DSN or use a Report Viewer that can store the passwords for you. You can of course also build your own .NET report viewer, which isn't very hard to do if you've got .NET knowledge.
Added on April 29, 2010:
What you can try is doing the following:
Connect to a "ODBC (RDO)" via "Create Connection" in Crystal Reports. At the bottom of the dialog you'll find an option to enter a connection string. A connection string can contain the login info, like the example below.
Example connection string:
DSN=;DB=;UID=;PWD=password
To automatic connect to SQL using user sa and password in Crystal Reports
1) Create File DSN in ODBC Control
2) In Create file DSN add line with SA Password like this:
[ODBC]
DRIVER=SQL Server
UID=sa
PWD=your_pass
DATABASE=Your_Database
WSID=YourServerName
APP=System operacyjny Microsoft® Windows®
SERVER=YourServerName\YourDatabase
Description=YourDescription
3) Connect to SQL in Crystal Report using Your DSN File
You have to remember that your password is easy to find so this is very dangerous.
In newer version of The Report Viewer, you create an override connection, leaving the server and database fields blank, but setting the username and password, and it will work. The software will set the username and password to that value without changing the other connection settings inside the report. This will stop it from prompting you for a username and password.
You could also set the username and password inside the ODBC driver, or other driver settings, but some databases don't allow this for security reason... and you may not be using ODBC.
we had this problem too, but are currently assessing sabrelogic logicity viewer.
It will store the username and password in a separate file, which call up, and runs the report. It has the advantage that I can store the reports in a central location, and just send out the file that calls up each report to each user, simplifying the problem of making changes to a report that has been distributed.
Sabrelogic
The only donwside that I have found with it to date is that it doesn't handle dynamic parameters very well.
I had the same problem with hana studio + crystal report and I solved it with this conection string, I forgot to put the user and password.
DRIVER={yourdriver};SERVERNODE=servername or IP;DATABASE=databaseName;UID=databaseuser;PWD=password