473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Crystal Reports .Net Blanking Password

Below is the code I have a question about. It is a simple setting of
tables with login information for my Web Form and response.writing out
the information:

crConnectionInfo = new ConnectionInfo();

crConnectionInfo.ServerName = "SSSQL\\STAGE";
crConnectionInfo.DatabaseName = "<DB>";
crConnectionInfo.UserID = "<USERNAME>";
crConnectionInfo.Password = "<PASSWORD>";

crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;
foreach(CrystalDecisions.CrystalReports.Engine.Tab le crTable in
crTables)
{
crTableLogonInfo = crTable.LogOnInfo;
crTableLogonInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogonInfo);

Response.Write("Password: " + crConnectionInfo.Password);
Response.Write("TableName: " + crTable.LogOnInfo.TableName);
Response.Write("DatabaseName: " +
crTable.LogOnInfo.ConnectionInfo.ServerName);
Response.Write("UserID: " + crTable.LogOnInfo.ConnectionInfo.UserID);
Response.Write("Password: " +
crTable.LogOnInfo.ConnectionInfo.Password);
}
return;

When I run this code, I get the following info written out to the
screen:
Password: <PASSWORD>
TableName: NavStatUserCats
DatabaseName: SSSQL\STAGE
UserID: <USERNAME>
Password:

My question is: Why is the second response.write of "Password" blank?
The first .write shows the connection info property. Why doesn't it
get assigned to the crTable connection property during the foreach?
I've spent days trying to figure this one out. I even downloaded all
Hot Fixes and Patches for my 9.0 and VS.Net 2003 hoping for a
solution.

Any help would be mucho bien.
Thanks in advance...
Nov 18 '05 #1
3 1600
Are you using a password type field to show the password?? thing is, because
of security reasons, :Net wont show any information on these types of text
boxes.
As a rule, you should never show password information on your pages, if you
need to change passwords, a separate module is better.

Hope this helps,

Jairo Nieto.
MCP
"TylerB" <ty**********@yahoo.com> wrote in message
news:df*************************@posting.google.co m...
Below is the code I have a question about. It is a simple setting of
tables with login information for my Web Form and response.writing out
the information:

crConnectionInfo = new ConnectionInfo();

crConnectionInfo.ServerName = "SSSQL\\STAGE";
crConnectionInfo.DatabaseName = "<DB>";
crConnectionInfo.UserID = "<USERNAME>";
crConnectionInfo.Password = "<PASSWORD>";

crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;
foreach(CrystalDecisions.CrystalReports.Engine.Tab le crTable in
crTables)
{
crTableLogonInfo = crTable.LogOnInfo;
crTableLogonInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogonInfo);

Response.Write("Password: " + crConnectionInfo.Password);
Response.Write("TableName: " + crTable.LogOnInfo.TableName);
Response.Write("DatabaseName: " +
crTable.LogOnInfo.ConnectionInfo.ServerName);
Response.Write("UserID: " + crTable.LogOnInfo.ConnectionInfo.UserID);
Response.Write("Password: " +
crTable.LogOnInfo.ConnectionInfo.Password);
}
return;

When I run this code, I get the following info written out to the
screen:
Password: <PASSWORD>
TableName: NavStatUserCats
DatabaseName: SSSQL\STAGE
UserID: <USERNAME>
Password:

My question is: Why is the second response.write of "Password" blank?
The first .write shows the connection info property. Why doesn't it
get assigned to the crTable connection property during the foreach?
I've spent days trying to figure this one out. I even downloaded all
Hot Fixes and Patches for my 9.0 and VS.Net 2003 hoping for a
solution.

Any help would be mucho bien.
Thanks in advance...

Nov 18 '05 #2
All I'm doing is response.writing out the variables to the screen - no
textboxes or anything. I wouldn't think .Net would do that. Any
suggestions on my question? I have followed MANY tutorials on the
subject of adding passing db info to the Crystal Report, and it still
gives me the "logon failed" message.

Thanks again...
TylerB

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
No textboxes are being used. I'm simply response.write(ing) the
variable information. Should be nothing wrong with doing that. So
why would my variable be blanking out then?
I've literally spent weeks trying to get this report to run. It has
no parameters. I've can run a blank template with a text field, and
all works fine. But as soon as I add a database field to it and set
connection info to that one table, it wigs out with the "logon failed"
message. I know it's probably something REALLY simple, but I'm just
not getting it.

Thanks again!
Tyler
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mithun Verma | last post by:
Hello All, I have a Windows application that uses Crystal Reports 9 (bundled Version) developed using VS.NET 2003 on a windows server 2003 m/c. The application has to be deployed on the client...
2
by: Karun Karunakaran | last post by:
Hi, I am using the Crystal Enterprise .NET assemblies to generate and display a crystal report in a webform. This report connects to an SQL server (running locally) using a specific username and...
3
by: Milan Todorovic | last post by:
Hello, I need help. I have experience in ASP.NET programming, but this is my first dealing with Crystal Reports. I'm trying to make the most basic report purely for testing purposes: connect to...
7
by: Bernie Yaeger | last post by:
I can't believe that there aren't lots of developers who: 1. create a crystal report that connects to sql server 2. calls the report using the crystalreportviewer control to view it and then,...
19
by: Michael O'Donnell | last post by:
Hi All Am having major problem with crystal reports...Have designed my report no problem, its when I try to run and display ther report that I am getting a "Login Failed" message. At first I...
2
by: daniel | last post by:
Hi all, I'm using Crystal Reports for Visual Studio .NET 2003 against a fixed Access database with a fixed database-level password, using OLEDB. I designed the reports just fine, but I'm not...
0
by: steve1rm | last post by:
Hello, I need you help with a crystal report problem. The report is very simple, and I have already done the layout. Howerver, I need to deploy. I am using crystal reports version 10. I have...
2
by: Simone | last post by:
Hello I am new to this :) I have created a crystal reports and tried using the Crystal Report Viewer but when I try to preview the report it prompts me for a user name and password. I am using...
5
by: ElTipo | last post by:
Hello People, I made a data base with secure wizard to provide to users a PID and Passwords. I need to extract data from Crystal Reports 7 in this data base but Crystal Reports send me a message...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.