Solved

Login Crystal Report in runtime

Posted on 2000-03-06
5
288 Views
Last Modified: 2012-05-04
Hello,
        At design time, the crystal report 7 seem save the userid and
password. (odbc to sql server).  Therefore, everyone can open
the  report file without fill in the login prompt.  How to disable
the saving userid and password and set them in runtime in my application?

Thanks.
Rgds.
alan
alanpong@hkstar.com
0
Comment
Question by:alanpong
  • 3
5 Comments
 

Expert Comment

by:bito_se
ID: 2588043
Hi Alan,

Crystal supports two methods (LogonServer, LogoffServer) which can be used for the purpose of logging on and off at runtime. The methods have an implementation for most (all?) of the available VB-design components / libraries.

Check out the Crystal help file for  appropriate usage.

regards,

Tomas
0
 
LVL 1

Author Comment

by:alanpong
ID: 2596003
sorry, i made a stupid mistake.
Actually, crystal report saves provider name, server name, and user id.  I found it by "edit" the rpt file.
By default, it will send blank password to the sql server.  The testing account in sql server has blank password.  Therefore, i misunderstand that the crystal report save the blank password.
0
 
LVL 1

Author Comment

by:alanpong
ID: 2596006
sorry, i made a stupid mistake.
Actually, crystal report saves provider name, server name, and user id.  I found it by "edit" the rpt file.
By default, it will send blank password to the sql server.  The testing account in sql server has blank password.  Therefore, i misunderstand that the crystal report save the blank password.
0
 
LVL 1

Accepted Solution

by:
jonder earned 50 total points
ID: 2607832
So do your users logon to the SQL Server before the program allows them access?

If so:
Set CRXTables = CRXSubreport.Database.Tables
Set CRXTable = CRXTables.Item(1)
Set CRXTable.SetLogOnInfo <ServerName>, <databasename>, <UserID>, <Password>

0
 
LVL 1

Author Comment

by:alanpong
ID: 2608852
jonder, yes.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now