Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on Cloud Connected vs On-Premise Services. Your feedback can help us shape the future of services.
Learn more about the survey or Click here to Launch the survey
Schneider Electric Services Innovation Team!

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

EcoStruxure Geo SCADA Expert Forum

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

cancel
Turn on suggestions
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: 
  • Home
  • Schneider Electric Community
  • Remote Operations
  • EcoStruxure Geo SCADA Expert Forum
  • "Database logon failed" when generating Crystal Report from ViewX using ODBC connection to SQL Server Database.
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
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
User Count
sbeadle
Kirk sbeadle Kirk
307
AndrewScott
Admiral AndrewScott
96
BevanWeiss
Spock BevanWeiss
90
AdamWoodlandToo
Lt. Commander AdamWoodlandToo
37
View All
Related Products
product field
Schneider Electric
EcoStruxure™ Geo SCADA Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to EcoStruxure Geo SCADA Expert Forum
Solved
AutoGui20
Ensign AutoGui20
Ensign

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

0 Likes
12
23982
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

Hi,

 

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.

Labels
  • Labels:
  • Drivers
  • ViewX
  • Tags:
  • connection
  • CrystalReports
  • error
  • odbc
  • ODBCconnection
  • reports
  • server
  • sql
  • sqlserver
Reply

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

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
AutoGui20
Ensign AutoGui20
Ensign

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

0 Likes
1
20641
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

See Answer In Context

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

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

Replies 12
BevanWeiss
Spock BevanWeiss
Spock

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

0 Likes
9
23955
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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)?

2020-05-25 10_05_48-Server Configuration [Crystal Reports on Local_localhost].png

 

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

2020-05-25 10_08_05-Local_~System.Reports.AC Power Fail Site Listing - ViewX.png

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

2020-05-25 10_10_34-Local_~Config.Security.Users.~External Interfaces.CrystalReports - ViewX.png

 

 

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..
Reply

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

sbeadle
Kirk sbeadle Kirk
Kirk

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

In response to BevanWeiss
0 Likes
0
23950
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

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

Some additions/changes:

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.

 

Reply

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

AutoGui20
Ensign AutoGui20
Ensign

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

In response to BevanWeiss
0 Likes
7
23940
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

Reply

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

BevanWeiss
Spock BevanWeiss
Spock

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

In response to AutoGui20
0 Likes
6
23938
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

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

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..
Reply

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

AndrewScott
Admiral AndrewScott
Admiral

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

In response to BevanWeiss
0 Likes
1
23930
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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".


Andrew Scott, R&D Principal Technologist, AVEVA
Reply

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

AutoGui20
Ensign AutoGui20
Ensign

Posted: ‎2020-05-27 06:55 AM

In response to BevanWeiss
0 Likes
3
23927
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

Posted: ‎2020-05-27 06:55 AM

Here is a screenshot of the Crystal Reports DSN setup in the Server Configuration:

CrystalReportDSN.PNG

 

and here are the ODBC connections on my machine:

ODBC_Setup.PNG

 

I am currently using the 32 bit ODBC connection but I have also tried the 64 bit version. One thing that was weird was that I had to type in the DSN into the server configuration because when I would click on the setup button and then selected the DSN it would not change on the server configuration. However, after some testing, it does seem to take it properly because I entered a DSN that didn't exist and when I tried to generate the report, it gave an error that it could not create a connection.

 

Here is the current setup for the location of my report:

ReportSetup.PNG

 

and here is the settings for my user:

UserSettings1.PNGUserSettings2.PNGUserSettings3.PNG

 

One thing that I wasn't sure about was what the ClearSCADA user, assigned under the "Location" setting, was for because the DSN and the report have the username and password that would be used to log into SQL Server. What ever the case may be, I put in the windows user I would like to use to generate the reports under printing in the server configuration since it had been mentioned above. Here is a screenshot of those settings:

 

PrintingSettings.PNG

Reply

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

AutoGui20
Ensign AutoGui20
Ensign

Posted: ‎2020-05-27 07:12 AM

In response to AndrewScott
0 Likes
0
23922
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

Posted: ‎2020-05-27 07:12 AM

I did have the report location set as Remote. I recently changed it and have been trying Local since it had been suggested. In my previous response I mentioned that I setup the DSN for Crystal Reports in the server configuration but I still got the same results.

 

I created both a 32 and 64 bit system DSN on my machine (everything is setup locally). What I noticed is that in the report, it can only locate the 32 bit version DSN. Here is a screenshot of that:

ReportODBC.PNG

 

The username and password were entered into the DSN and the report. However, I have noticed that the report asks for the credentials after I've restarted the ClearSCADA server. So I'm not sure if the report actually saves the credentials. It might just hold it in memory but the report still fails to generate even after I've entered the credentials and I save it.

 

Could there be an issue if the report is using the 32 bit DSN version while ClearSCADA uses the 64 bit version?

 

Lastly, in my previous reply, I mentioned that I setup the windows user that I want to generate the reports with in the server configuration under printing. This user had admin permissions in SQL but it is a different user that what I specified in the DSN and the report. That user is not a windows users, it's only an SQL user with admin permissions in SQL.

Reply

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

AndrewScott
Admiral AndrewScott
Admiral

Posted: ‎2020-05-27 07:40 AM

In response to AutoGui20
0 Likes
2
23920
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

Posted: ‎2020-05-27 07:40 AM

The Server Configuration DSN setting in the first screenshot above is not valid. This DSN must be a 64-bit ClearSCADA DSN for the local ClearSCADA database, but you've specified a 32-bit SQL Server DSN. The correct DSN for this setting is "ClearSCADA" based on the ODBC connections screenshot, however this isn't relevant to this particularly report as it isn't querying the ClearSCADA database.

 

The third screenshot shows the database source location as "Local Database", but this report isn't querying the local ClearSCADA database, but an SQL Server database and therefore the location must be set to "Remote Database(s)".

 

The second screenshot shows two SQL Server data sources called "SQLServer32" and "SQLServer64". What is the name of the data source used in the report definition? You must create a 64-bit SQL Server data source with the exact same name to be able to generate the report in ClearSCADA. Given that Crystal Reports is a 32-bit application and ClearSCADA is a 64-bit application you will need two different SQL Server data sources with the same name.


Andrew Scott, R&D Principal Technologist, AVEVA
Reply

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

AutoGui20
Ensign AutoGui20
Ensign

Posted: ‎2020-05-28 08:14 AM

In response to AndrewScott
0 Likes
1
23897
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

Posted: ‎2020-05-28 08:14 AM

Right, the DSN configuration was originally "ClearSCADA", before I changed it. I have set it back to "ClearSCADA".

CrystalReportDSN_V2.PNG

 

I have gone ahead and updated the SQL DSN for the 32 and 64 bit to match:

ODBC_SetupV2.PNG

 

I have also changed the report from using Local to using Remote for "Location":

ReportSetupV2.PNG

 

Lastly, I updated the report to use the new "SQLServer" DSN name and could get it to generate a preview with data:

ReportODBC_V3.PNGReportPreview.PNG

 

However, when I tried to generate it through ViewX again, it failed with the same database logon failed:

ReportEvents.PNG

Reply

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

AndrewScott
Admiral AndrewScott
Admiral

Posted: ‎2020-05-28 10:04 AM

In response to AutoGui20
0 Likes
0
23891
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

Posted: ‎2020-05-28 10:04 AM

All of these settings now appear to be correct.

What kind of authentication are you using in the SQL server DSN's?

I've been unable to get reports to work with Integrated Windows authentication (formally Windows NT authentication). It appears that something about user impersonation (for the printing Windows user) isn't compatible with this form of authentication.

If its possible, it may be worth trying SQL Server authentication. I've not been able to try this myself.


Andrew Scott, R&D Principal Technologist, AVEVA
Reply

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

AutoGui20
Ensign AutoGui20
Ensign

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

0 Likes
1
20642
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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.

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

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

BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2021-03-15 06:17 PM

In response to AutoGui20
0 Likes
0
20621
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

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

Posted: ‎2021-03-15 06:17 PM

It should be noted that there are performance impacts on referencing ODBC data sources via the Linked ODBC Table feature.

 

Recommendations were:

  • Configure Data Source Location to be 'Remote' on Crystal Reports Geo SCADA Expert object
  • Ensure correct DSN was referenced in Crystal Report (and save username/password details within Report).  This means that the 64bit System DSN created (for Geo SCADA Expert Crystal Report driver) should have had the same name as the 32bit System DSN you created (for Crystal Reports Designer)
  • SQL Server configured to not use Windows Integrated Security if possible (or further investigation performed into whether this will work correctly with the Impersonation configuration of the Crystal Reports driver)

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..
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

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

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of