Print Page | Close Window

Crystal reports not working in Windows 7

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21139
Printed Date: 28 Mar 2024 at 11:09am


Topic: Crystal reports not working in Windows 7
Posted By: vbmaayah
Subject: Crystal reports not working in Windows 7
Date Posted: 28 Oct 2014 at 8:41am

Experts … I really need your help!
I have a VB .net 2005 windows app. It has been working on Windows XP (32-bit) environment for a while with no issues and now we are moving to Windows 7 (64-bit). The program runs fine except for the reports which was written using built in crystal report came with VB .net 2005. I get an ERROR Database Login and it asks for Login ID and password. The database is MS access 2002 SP3 and the compiler is set to target X86. Below is a screen print of the error message and the code used to connect to data base and also the code behind the form that calls the report
HELP PLEASE !!!!

I am using the following connection string:

DBconn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & str_data & ";Persist Security Info=true;user ID=Admin;Jet OLEDB:Database Password= mypassword"



And on the REPORT form I have the following code


Private Sub frmExportDiv_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim crReportDocument As CrySelectedDivisionSummary
        crReportDocument = New CrySelectedDivisionSummary
        Dim ss As String = Application.StartupPath()
        Dim logOnInfo As New CrystalDecisions.Shared.TableLogOnInfo
        logOnInfo.ConnectionInfo.ServerName = ss & "\\Firm_data.mdb"
        logOnInfo.ConnectionInfo.Password = "mypassword"
        logOnInfo.ConnectionInfo.UserID = "Admin"
       crReportDocument.Database.Tables("qryExportDiv").ApplyLogOnInfo(logOnInfo)
        cryprintandexport.ReportSource = crReportDocument
End Sub



Replies:
Posted By: hilfy
Date Posted: 10 Nov 2014 at 9:26am
Crystal is a 32-bit application. You MUST have the 32-bit version of the database client software and, if you're using an ODBC connection, you MUST set up a 32-bit ODBC connection using the 32-bit ODBC Administrator. It will NOT work on a 64-bit connection.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: vbmaayah
Date Posted: 10 Nov 2014 at 9:40am
Hi Hilfy,
Thank you so much for your input.
I do have a 32-bit version of the software.
When creating the crystal reports I create using Access/Excel (DAO). It asks me for the database name and
the password. See attached.

To connect to the data I used the connection string I listed above.

How can I “you MUST set up a 32-bit ODBC connection using the 32-bit ODBC Administrator. “??



Posted By: vbmaayah
Date Posted: 10 Nov 2014 at 9:42am
For some reason it is not allowing me to add the image


Posted By: hilfy
Date Posted: 10 Nov 2014 at 11:46am
If you go to your Start menu and navigate to where the link for Crystal is on that server, you should see in the same folder "32-bit ODBC Data Source Administrator". Or you can just run C:\Windows\SysWOW64\odbcad32.exe.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: vbmaayah
Date Posted: 10 Nov 2014 at 12:10pm
I did go to the ODBC Data Source Administrator menu. But how do I set up a 32-bit ODBC connection ?


Posted By: hilfy
Date Posted: 11 Nov 2014 at 4:01am
The "regular" ODBC Data Source Administrator on the Administrative Tools menu is 64-bit. You MUST run the 32-bit version of the tool. I explained in my last post where to find it.

You'll create a new "System" DSN, select the correct Access driver, and follow the prompts in the rest of the wizard. You'll then need to use this connection in your report.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: vbmaayah
Date Posted: 11 Nov 2014 at 4:31am
Thank you Hilfy for being patient with me. When I open the ODBC Data Source Administrator then click on System DSN a new form opens title Create New Data Source, in the middle of the popup form it says select a driver for which you want to setup a data source. The list I have it only shows SQL Server and SQL Server Native Client 11.0. That is it. No access driver in that list. Am I missing something? what do I do to add it?
Thanks in advance!


Posted By: hilfy
Date Posted: 11 Nov 2014 at 4:41am
You may need to download and install the MS Access driver.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: vbmaayah
Date Posted: 11 Nov 2014 at 5:57am
I have MS office installed do I still need to do a separate installation for access?


Posted By: hilfy
Date Posted: 11 Nov 2014 at 6:57am
I'm not really sure - I don't really work with Access. You might try asking about this on one of the MSDN forums.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: vbmaayah
Date Posted: 11 Nov 2014 at 8:54am
I will and let you know. Thanks again



Print Page | Close Window