|
-
Aug 29th, 2005, 04:17 AM
#1
Thread Starter
Addicted Member
Unable to retrieve Crystal Report with Password Protected Acces DB
Dim sRep As String
sRep = "RepStudentResults.rpt"
cr1.ReportFileName = App.path & "/" & sRep
cr1.WindowState = crptNormal
cr1.WindowWidth = 800
cr1.WindowHeight = 600
cr1.PrintReport
cr1.Reset
This is the code im ussing to retrieve a Crystal Report (ver 8.1) in a vb6 app. The Database i make use of is an access db that is password protected.
Im having difficulties to retrieve the report
Do i have to pass the Access pasword to Crystal somewhere or what?
-
Aug 29th, 2005, 05:26 AM
#2
Re: Unable to retrieve Crystal Report with Password Protected Acces DB
First, your slash is going the wrong way. It should be "\" & sRep
and second, yes, in order to open a password protected database, you must pass the password.
-
Aug 29th, 2005, 05:45 AM
#3
Thread Starter
Addicted Member
Re: Unable to retrieve Crystal Report with Password Protected Acces DB
How do i pass the database password through crystal?
something like this:
-
Aug 29th, 2005, 10:58 AM
#4
Re: Unable to retrieve Crystal Report with Password Protected Acces DB
If you open it with your VB6 front end, then it will already be open when you call your report, so you shouldn't have to pass it to crystal. Only to Access in your connection string.
-
Aug 29th, 2005, 11:46 AM
#5
Re: Unable to retrieve Crystal Report with Password Protected Acces DB
Unfurtunity that is not true with crystal. Using Crystal with proteted MS Access database is a real hassel. I use it with many and with versions before CR 9 You need to set a registry entry if you are using groups and user permissions. Crystal supplied a program called sysdb32 that let you do this if you did not want to manipulate the registry manually.
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Aug 29th, 2005, 12:09 PM
#6
Re: Unable to retrieve Crystal Report with Password Protected Acces DB
 Originally Posted by GaryMazzone
Unfurtunity that is not true with crystal. Using Crystal with proteted MS Access database is a real hassel. I use it with many and with versions before CR 9 You need to set a registry entry if you are using groups and user permissions. Crystal supplied a program called sysdb32 that let you do this if you did not want to manipulate the registry manually.
That is good to know. All of my experience with Crystal has been with SQL Server or Oracle.
If you are using Access, then why wouldn't you want to use Access reports instead of Crystal?
-
Aug 30th, 2005, 03:36 AM
#7
Thread Starter
Addicted Member
RESOLVED - Re: Unable to retrieve Crystal Report with Password Protected Acces DB
Resolved it by passing the password
cr1.Connect = "DSN=MyApp;UID= ;PWD=123 ;DSQ=MyApp"
HTML Code:
Dim sRep As String
sRep = "RepStudentResults.rpt"
cr1.Connect = "DSN=MyApp;UID= ;PWD=123 ;DSQ=MyApp"
cr1.ReportFileName = App.path & "/" & sRep
cr1.WindowState = crptNormal
cr1.WindowWidth = 800
cr1.WindowHeight = 600
cr1.PrintReport
cr1.Reset
-
Aug 30th, 2005, 07:46 AM
#8
Re: Unable to retrieve Crystal Report with Password Protected Acces DB
I am programming the app in VB6 and can't be sure a user has Access. So I use crystal for all report output. Also some apps pass data into Excel for graphing functions (only if Excel on the system). For those that use Excel the requirements state that Excel is required to do the graphing. I found that Crystal graphing functions did not perform to my requirements way to simple graphs.
Sometimes the Programmer
Sometimes the DBA
Mazz1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|