|
| I've found that all the demos show a Crystal report with a
blank password database connection - which works fine. If
you have a non-blank password you need to set the table
properties for each table in your Crystal report - in the
page load. See the online help topic labeled "Accessing
Secure Databases" - excerpt below.
HTH,
Susan
The procedure for accessing secure databases through
Crystal Reports for Visual Studio .NET differs between Web
Forms and Windows Forms. In a Windows Form, a dialog box
automatically prompts users to enter their user name and
password. In a Web Form, however, you need to design a
form that retrieves this information from the user. In
both situations, you can use code to specify the user name
and password, thereby giving the same level of security to
all users of your application.
Setting Database Logon Parameters
The following example demonstrates how to pass logon
parameters to the tables in a report. For this example, a
connection to a secure SQL Server database is being used.
Start a new project
Add a Button and four Textbox controls to the form.
Name the TextBox controls serverNameTxt, dbNameTxt,
userNameTxt, and passwordTxt.
Double-click the Button control to specify code for the
Click event. Depending on the language you are using,
insert the appropriate.
[Visual Basic]
' Declare require variables.
Dim logOnInfo As New TableLogOnInfo()
Dim i As Integer
' Loop through every table in the report.
For i = 0 To report.Database.Tables.Count - 1
' Set the connection information for current table.
logOnInfo.ConnectionInfo.ServerName = serverNameTxt.Text
logOnInfo.ConnectionInfo.DatabaseName = dbNameTxt.Text
logOnInfo.ConnectionInfo.UserID = userNameTxt.Text
logOnInfo.ConnectionInfo.Password = passwordTxt.Text
report.Database.Tables.Item(i).ApplyLogOnInfo(logOnInfo)
Next i
[C#]
// Declare required variables.
TableLogOnInfo logOnInfo = new TableLogOnInfo ();
int i = 0;
// Loop through every table in the report.
for (i=0;i == Report.Database.Tables.Count - 1;i++)
{
// Set the connection information for the current table.
logOnInfo.ConnectionInfo.ServerName =
serverNameTxt.Text;
logOnInfo.ConnectionInfo.DatabaseName = dbNameTxt.Text;
logOnInfo.ConnectionInfo.UserID = userNameTxt.Text;
logOnInfo.ConnectionInfo.Password = passwordTxt.Text;
Report.Database.Tables [i].ApplyLogOnInfo (logOnInfo);
}
>-----Original Message-----
>IE never load my web page having crystal report on it.
>please ask me what is problem and how i can solve it.
>.
>
|
|