By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,480 Members | 1,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,480 IT Pros & Developers. It's quick & easy.

Crystal Reports .Net Blanking Password

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.