Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Crystal reports not working in Windows 7 Post Reply Post New Topic
Page  of 2 Next >>
Author Message
vbmaayah
Newbie
Newbie


Joined: 03 Oct 2014
Online Status: Offline
Posts: 7
Quote vbmaayah Replybullet Topic: Crystal reports not working in Windows 7
    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
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet 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
IP IP Logged
vbmaayah
Newbie
Newbie


Joined: 03 Oct 2014
Online Status: Offline
Posts: 7
Quote vbmaayah Replybullet 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. “??



Edited by vbmaayah - 10 Nov 2014 at 9:42am
IP IP Logged
vbmaayah
Newbie
Newbie


Joined: 03 Oct 2014
Online Status: Offline
Posts: 7
Quote vbmaayah Replybullet Posted: 10 Nov 2014 at 9:42am
For some reason it is not allowing me to add the image
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet 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
IP IP Logged
vbmaayah
Newbie
Newbie


Joined: 03 Oct 2014
Online Status: Offline
Posts: 7
Quote vbmaayah Replybullet 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 ?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet 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

Edited by hilfy - 11 Nov 2014 at 4:01am
IP IP Logged
vbmaayah
Newbie
Newbie


Joined: 03 Oct 2014
Online Status: Offline
Posts: 7
Quote vbmaayah Replybullet 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!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 11 Nov 2014 at 4:41am
You may need to download and install the MS Access driver.

-Dell
IP IP Logged
vbmaayah
Newbie
Newbie


Joined: 03 Oct 2014
Online Status: Offline
Posts: 7
Quote vbmaayah Replybullet Posted: 11 Nov 2014 at 5:57am
I have MS office installed do I still need to do a separate installation for access?
IP IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.032 seconds.