Solved

Login Crystal Report in runtime

Posted on 2000-03-06
5
291 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

825 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