"Database logon failed" when generating Crystal Report from ViewX using ODBC connection to SQL Server Database.

Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for Show only | Search instead for Did you mean: Invite a Co-worker

Send a co-worker an invite to the portal. Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.

You have entered an invalid email address. Please re-enter the email address. This co-worker has already been invited to the Exchange portal. Please invite another co-worker. Please enter email address Send Invite Cancel Invitation Sent Your invitation was sent. Thanks for sharing Exchange with your co-worker. Send New Invite Close Top Experts

Spock

sbeadle

BevanWeiss

Admiral

AndrewScott

Commander

geoffpatton

Related Products

product field

Schneider Electric EcoStruxure™ Geo SCADA Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Ensign

AutoGui20

Posted: ‎2020-05-22 03:41 PM . Last Modified: ‎2023-05-03 12:14 AM

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-05-22 03:41 PM . Last Modified: ‎2023-05-03 12:14 AM

"Database logon failed" when generating Crystal Report from ViewX using ODBC connection to SQL Server Database.

I have already submitted a request to support for this issue but I thought I would see if anyone else had any thoughts on this or had run into this issue before and got it resolved.

I built a crystal report that pulls in data from a SQL table using an ODBC connection. The report is pointed to the table and is not using a command to pull in the data. I know that the connection, specifically the credentials, is working because I can preview the report in the Crystal Reports editor which successfully pulls in the data.

The problem is that when I try to generate the report through ViewX, I am seeing in the events and the crystal report logs that the report failed to generate the report because the database logon failed.

This seems to be a ClearSCADA issue because Crystal Reports is able to connect and retrieve data from SQL Server using the ODBC connection.

I also checked SQL Profiler to see if there was any error on the SQL side but I did not seen messages. I was able to see through the query that Crystal Reports used to retrieve the data when previewing the report in the editor. I even verified that the query would execute successfully in SQL directly. So its not an issue with the report, its contents, or the connection information.

This is a local setup and I am an administrator on my machine and in SQL. The user I provided in the ODBC connection is also an admin.

Any help would be appreciated.

Link copied. Please paste this link to share this article on your social media post.


Accepted Solutions

Ensign

AutoGui20

Posted: ‎2021-03-15 09:35 AM

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-03-15 09:35 AM

I wanted to provide an update to this issue as I was actually able to get around the issue. I should have provided the update when the workaround was still fresh in my mind. However, I got caught up with some other work and didn't get to updating this issue.

Anyways, I was able to get the report working by setting up the SQL table as a linked ODBC table in the server configuration. This allowed me to query the SQL table as if it was a table in ClearSCADA. Therefore, I pointed the report to ClearSCADA using an ODBC connection and I was able to query the table I needed. It worked and got me the data I needed into the report so that was good enough me. Unfortunately, I was unable to get the report working with an ODBC connection directly to SQL.

I hope this at least provides a workaround for other that might be having a similar issue.

Link copied. Please paste this link to share this article on your social media post.

Replies 12

BevanWeiss

Posted: ‎2020-05-24 05:11 PM

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-05-24 05:11 PM

To run through a few things.

The DSN that you have here is correct? and configured as you expect it to be (i.e. 64-bit / 32-bit as appropriate)?

And then you have the Location and User configured correctly here?

And the user has the right security permissions?

I'm not sure entirely if this tick box needs to be ticked for ODBC access in new versions, but I'd probably give it a try if it's not already in your system

Let us know how you go with confirming those.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..

Link copied. Please paste this link to share this article on your social media post.

Spock

sbeadle

Posted: ‎2020-05-25 12:42 AM

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-05-25 12:42 AM

The 'can edit SQL' setting does not affect Crystal, so is not needed.

The Crystal Report setting Location = 'Local Database' means that whatever database connection settings and credentials the report might have, they will all be replaced by the Geo SCADA connection DSN configured in the top image, with the user specified under the Location setting. So if you are accessing a different database then it will not work. Choose the other remote database option and all of the connection and credential information you save after editing them in the report will be used during report generation.

Link copied. Please paste this link to share this article on your social media post.

Ensign

AutoGui20

Posted: ‎2020-05-26 03:06 PM

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-05-26 03:06 PM

I did not have have the correct the DSN in the location of the first image you sent (Server configuration ->Global Parameters ->Crystal Reports). So I tried both the 32 bit and 64 bit DSN for SQL with the local database setting for "Location" and I set a user with the permission to edit/access everything (including the edit SQL option). However, I still received the same error.

A bit more information on what I had tried before your suggestion: I originally was using local database for the "Location" setting with no user defined. However, that was giving me an error that the SQL table couldn't be found. After speaking with a colleague, he suggested using the remote database and that's when I started to get the Database logon error and I have stuck with using the Remote Database option since then.

Link copied. Please paste this link to share this article on your social media post.

BevanWeiss

Posted: ‎2020-05-26 07:45 PM

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-05-26 07:45 PM

:winking_face:

Screen shots or it didn't happen.

Show us the DSN settings as you configured them from the Server Configuration window.

I have a suspicion that you still don't have the DSN settings right.

I'd recommend that you go with Local for the Report Location, and enter an appropriate user here (unless you are indeed trying to access a different System / different SQL entirely).

If you didn't specify a User, then it would make some sense that it complained it couldn't find the tables you referenced. the Everyone account possibly doesn't have Read / Browse permissions.

Go back to Local. Put in an appropriate user account for Crystal Reports to use.

If that doesn't work, then show us what you have for the DSN settings.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..

Link copied. Please paste this link to share this article on your social media post.

Admiral

AndrewScott

Posted: ‎2020-05-27 03:33 AM

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2020-05-27 03:33 AM

As your report is querying a Microsoft SQL Server database, and not the ClearSCADA database, you must set the report location to remote and not local. The DSN specified in the " Server Configuration \ Global Parameters \ Crystal Reports" section only applies to reports where the report location is local, so it is not applicable in this case. If the report location is set to local then only the local ClearSCADA database can be queried by the report as all of the DSN's specified in the report will be replaced with the one specified in the server configuration tool.

For a report using the remote report location to work you must create a 64-bit System DSN on the ClearSCADA server(s) which has the exact same name as the DSN used when designing the report. Also, the credentials required to access the database must be saved in either the report or the DSN itself. If generating the report prompts you to enter credentials (e.g. a password) then the report will not work with ClearSCADA.

Bear in mind that the report will be generated using the Windows user account specified in the "Server Configuration \ System Configuration \ Printing" section, which may affect the logon, depending on what type of authentication is being used.

The online help has more information, see " Driver Reference > Crystal Reports Driver > Creating a Report and Defining the Report Properties > Specify the Data Source".