R
Raghu Raman
Hi,
am using crystal report in my c#.net
The report was initially designed with the RDO Connection and uses the
stroed proc,This sp requires 4 parameters.In my c# web app , i simply
included the report(.rpt) file and made an object for that and am
passing the parameters.Finally it gives the error message as,
LOGON FAILED.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details:
CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.
--------------------My code----------------
rpt_proc_auditlog rpt=new rpt_proc_auditlog();
TableLogOnInfo loginfo=new TableLogOnInfo();
ConnectionInfo coninfo=new ConnectionInfo();
Database crDatabase;
Tables crTables;
//Table crTable;
crDatabase=rpt.Database;
coninfo.ServerName="TCMS";
coninfo.UserID="TCMS_DATA";
coninfo.Password="SOCOOL";
coninfo.DatabaseName ="TCMS_DATA";
crDatabase=rpt.Database;
crTables=crDatabase.Tables;
foreach(CrystalDecisions.CrystalReports.Engine.Table crTable in
crTables)
{
loginfo = crTable.LogOnInfo;
loginfo.ConnectionInfo = coninfo;
crTable.ApplyLogOnInfo(loginfo);
}
//rpt.SetDatabaseLogon("TCMS_DATA","SOCOOL","TCMS","TCMS_DATA");
rpt.SetParameterValue("sDisplayLabel","Header");
rpt.SetParameterValue("STABLENAME","MASTERPHYS");
rpt.SetParameterValue("NPKID",Convert.ToInt16("3664"));
CREP.ReportSource=rpt;
--------------
cOULD YOU PLEASE TELL ME THE MISTAKE I MADE.
With thanks
Raghu
am using crystal report in my c#.net
The report was initially designed with the RDO Connection and uses the
stroed proc,This sp requires 4 parameters.In my c# web app , i simply
included the report(.rpt) file and made an object for that and am
passing the parameters.Finally it gives the error message as,
LOGON FAILED.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details:
CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.
--------------------My code----------------
rpt_proc_auditlog rpt=new rpt_proc_auditlog();
TableLogOnInfo loginfo=new TableLogOnInfo();
ConnectionInfo coninfo=new ConnectionInfo();
Database crDatabase;
Tables crTables;
//Table crTable;
crDatabase=rpt.Database;
coninfo.ServerName="TCMS";
coninfo.UserID="TCMS_DATA";
coninfo.Password="SOCOOL";
coninfo.DatabaseName ="TCMS_DATA";
crDatabase=rpt.Database;
crTables=crDatabase.Tables;
foreach(CrystalDecisions.CrystalReports.Engine.Table crTable in
crTables)
{
loginfo = crTable.LogOnInfo;
loginfo.ConnectionInfo = coninfo;
crTable.ApplyLogOnInfo(loginfo);
}
//rpt.SetDatabaseLogon("TCMS_DATA","SOCOOL","TCMS","TCMS_DATA");
rpt.SetParameterValue("sDisplayLabel","Header");
rpt.SetParameterValue("STABLENAME","MASTERPHYS");
rpt.SetParameterValue("NPKID",Convert.ToInt16("3664"));
CREP.ReportSource=rpt;
--------------
cOULD YOU PLEASE TELL ME THE MISTAKE I MADE.
With thanks
Raghu