Solved

Login Crystal Report in runtime

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reading the Contents of a Directory In Access VBA 5 89
Microsoft Access combo box help 2 52
MS Date Picker 64 bit 32 bit issue 12 64
Problem to With line 4 76
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

726 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