Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Login Crystal Report in runtime

Posted on 2000-03-06
5
Medium Priority
?
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 150 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

604 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