rpt file and password protected mdb file 
Author Message
 rpt file and password protected mdb file

Hi,
I am new Crystal Reports.I want to what is the correct procedure to connect
a rpt file to a password protected mdb file. Here is my code:

Private Sub Form_Load()
'    Report1.Password = "mypass"
    Report1.Connect = "Login Name = Admin;password=mypass"
    Report1.DataFiles(0) = "E:\myBOOK\Database\my.MDB"
    Report1.ReportFileName = "c:\Program
Files\DevStudio\vb\Report\mlbl.rpt"
    Report1.Destination = crptToWindow
        ......
end sub

Whenever I am trying with this code I was get any error message like
connection failed. I don't know what is wrong with my code.My rpt file is
SQL based.
Thanks in advance for all answers. Pl. send the reply to My e-Mail ID



Wed, 29 Mar 2000 03:00:00 GMT  
 rpt file and password protected mdb file

Hi vijay

Quote:

> Hi,
> I am new crystal reports.I want to what is the correct procedure to connect
> a rpt file to a password protected mdb file. Here is my code:

> Private Sub Form_Load()
> '    Report1.Password = "mypass"
>     Report1.Connect = "Login Name = Admin;password=mypass"
>     Report1.DataFiles(0) = "E:\myBOOK\Database\my.MDB"
>     Report1.ReportFileName = "c:\Program
> Files\DevStudio\vb\Report\mlbl.rpt"
>     Report1.Destination = crptToWindow
>         ......
> end sub

I do it in the follwing way. Assume the Database is ODBC registered
under "MyDataBase".
If you use a MS-Access Database then don't forget to register the
System.MDA also.
Otherwise Connection will fail. I assume that you only connect to one
database.

After that you can connect the Report as follws:

        Report1.Connect = "DSN=MyDataBase;UID=Name of user;PWD=a
password;;DSQ="
        Report1.ReportFileName = "c:\ProgramFiles\DevStudio\vb\Report\mlbl.rpt"

you don't have to use .DataFiles(..) or .Password to make it work.

Another tip with Crystal Reports. Never use parameters (via formulas) to
scale your Selection Clauses.
This will decrease performance radiacally beacause Selection based on
formulas will be performed
after the SQL-Query. Selection based on constants will be performed in
the SQL-Query (see Database/SQLQuery)
If you want to scale yout reports it might be better (I do it so) to
retrieve the SQL Statement via
Crystal Reports API and modify the WHERE Clause.

I hope this will help.
Kai



Wed, 29 Mar 2000 03:00:00 GMT  
 rpt file and password protected mdb file

This is a multi-part message in MIME format.

------=_NextPart_000_01BCDC06.B434B980
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

The previous post covers user access security.  If you are referring to the
database password feature that became available beginning with Access 95,
then to open the password protected mdb you will have to remove the
password before opening a report that uses the database.  It is possible to
code this with DAO. It may be possible to set up another mdb that links to
the tables in the password protected mdb.  If I'm not mistaken, the
password will be stored when you set up the linked tables.

Good luck,
Joe Sytniak

------=_NextPart_000_01BCDC06.B434B980
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<html><head></head><BODY bgcolor=3D"#FFFFFF"><p><font size=3D4 =
color=3D"#000000" face=3D"EucrosiaUPC">The previous post covers user =
access security. &nbsp;If you are referring to the database password =
feature that became available beginning with Access 95, then to open the =
password protected mdb you will have to remove the password before =
opening a report that uses the database. &nbsp;It is possible to code =
this with DAO. It may be possible to set up another mdb that links to =
the tables in the password protected mdb. &nbsp;If I'm not mistaken, the =
password will be stored when you set up the linked tables.<br><br>Good =
luck,<br>Joe Sytniak<br><br><br><br></p>
</font></body></html>
------=_NextPart_000_01BCDC06.B434B980--



Thu, 06 Apr 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB5 and PASSWORD Protected MDB file.

2. Is MDB File Password Protected?

3. protect .mdb files with password

4. how vb handles Winziped .mdb file with password protected

5. 'how to open an password protected access mdb file

6. 'how to open an password protected access mdb file

7. 'how to open an password protected access mdb file

8. 'how to open an password protected access mdb file

9. how vb handles Winziped .mdb file with password protected

10. how vb handles Winziped .mdb file with password protected

11. open password protected (.mdb file)

12. how vb handles Winziped .mdb file with password protected

 

 
Powered by phpBB® Forum Software