D
Dilini Ginige
Hi,
I need to open a crystal report through the crystalreportform viewer
in a C# project.
I used a view in the crystal report.But even when I give the logoninfo
from the code the dialog box to login to the database promts from the
application.
The coding I used is as follows.
public TableLogOnInfos AddLogOnInfo(TableLogOnInfos
tableLogOnInfos,string strViewName)
{
TableLogOnInfo logOnInfo = new TableLogOnInfo ();
// Set the connection information for the table in the report.
logOnInfo.ConnectionInfo.ServerName = sqlServer;
logOnInfo.ConnectionInfo.DatabaseName = sqlDataBase;
logOnInfo.ConnectionInfo.UserID = sqlUserID;
logOnInfo.ConnectionInfo.Password = sqlPassword;
logOnInfo.TableName = strViewName;
// Add the logoninfo to the logOnInfos collection.
tableLogOnInfos.Add (logOnInfo);
return tableLogOnInfos;
}
If anybody knows whats wrong with this .Can u pls let me know.
Is it because I have assumed the view to be same as a table.??
Thx
Dilini
I need to open a crystal report through the crystalreportform viewer
in a C# project.
I used a view in the crystal report.But even when I give the logoninfo
from the code the dialog box to login to the database promts from the
application.
The coding I used is as follows.
public TableLogOnInfos AddLogOnInfo(TableLogOnInfos
tableLogOnInfos,string strViewName)
{
TableLogOnInfo logOnInfo = new TableLogOnInfo ();
// Set the connection information for the table in the report.
logOnInfo.ConnectionInfo.ServerName = sqlServer;
logOnInfo.ConnectionInfo.DatabaseName = sqlDataBase;
logOnInfo.ConnectionInfo.UserID = sqlUserID;
logOnInfo.ConnectionInfo.Password = sqlPassword;
logOnInfo.TableName = strViewName;
// Add the logoninfo to the logOnInfos collection.
tableLogOnInfos.Add (logOnInfo);
return tableLogOnInfos;
}
If anybody knows whats wrong with this .Can u pls let me know.
Is it because I have assumed the view to be same as a table.??
Thx
Dilini