How to give login info in Crystal Report

aliweb

Active member
Joined
Sep 14, 2005
Messages
40
Programming Experience
3-5
I have a simple application containing one crystal report. I am using a password protected MS Access database. When I run the report a screen pops up and asks for Server, Database, User and Password. How do I avoid that?
 
This is happening on my PC and I haven't checked on other PCs.
I am using Oledb for connection.
 
Be sure that you have properly entered the password (look at the pic below). Also you didn't say me what is the way you call the report file? Through viewer maybe? If it's so then post the code. Actually post the code no matter of way. There must be something that you are doing wrong.

Regards ;)
 

Attachments

  • oledb.png
    oledb.png
    8.4 KB · Views: 225
Here is the program

I have attached my program. For the time being I have removed the password from the Access database and I have 2 other problems.

The database is very simple having just one table TBL_CODE and this table contain just one field CODE_NO.
The program is also simple contains

One Dataset - Dataset1.xsd
Two Forms - Form1.vb, Form2.vb
One Crystal Report - CrystalReport1.rpt

When you run the program it loads Form1. Click on the button on Form1 and it will load Form2 which contains the report.

Here are the problems I am facing.

1. Even though I have made connection in Dataset1 and I am using that dataset in the crystal report, but when you run the report it asks for connection properties.

2. How can I pass parameters? I have seen some examples on the internet but I do not seem to understand them. What I want is a query like this

SELECT * FROM TBL_CODE WHERE CODE_NO='1111'

Currently the report prints all the records. I want to display a specific number of records like the above and for that I need to pass parameters to report, right!? Can you please do this for me and modify the source code.

3. Third problem is you already know that how do I connect crystal report to a password protected access database.
 

Attachments

  • Example.zip
    25.5 KB · Views: 46
Back
Top