ylikhite
May 23rd, 2005, 12:55 AM
Hi there,
I am using CE RAS 9.2 for reporting in an ASP.Net application. All my reports which do not involve sub-reports work perfectly fine with this version of RAS. But now when I try to create sub-reports using RAS 9.2 I am constantly facing this error,
"Logon failed. Details: Object reference not set to an instance of an object. Error in File C:\WINNT\TEMP\{A9A21215-B54B-4BF6-B028-20EA73476373}.rpt: Unable to connect: incorrect log on parameters.
"
Following is the code snippet for running a report containing sub-reports.
/////////////////////////
Report_EquityManager objManager = new Report_EquityManager();
System.Data.DataSet rptDS = objManager.GetDataSet(objEntity);
ReportClientDocument rptDoc = new ReportClientDocument();
rptDoc.ReportAppServer = "RASServerName";
//Below path exists on server where RAS service is running
//xyz.rpt contains sub-reports viz. s1 and s2
object ReportPath = "C:\MyFolder\xyz.rpt"
ISCRDataSet ds = DataSetConverter.Convert(rptDS);
rptDoc.Open(ref ReportPath,0);
rptDoc.SubreportController.SetTableLocation("s1", ds.Tables[0], ds.Tables[0]);
rptDoc.SubreportController.SetTableLocation("s2", ds.Tables[1], ds.Tables[1]);
this.CrystalReportViewer1.EnableDrillDown = false;
this.CrystalReportViewer1.DisplayGroupTree = false;
this.CrystalReportViewer1.ReportSource = rptDoc;
this.CrystalReportViewer1.DataBind();
//////////////////
Problem is that the error occurs at the second call of SetTableLocation. And when I comment that line, the error occurs after successfully executing the code without any exception. This time I am not able to trace where it is going wrong.
Is there any solution to resolve the problem.
Thanks,
Yatin
I am using CE RAS 9.2 for reporting in an ASP.Net application. All my reports which do not involve sub-reports work perfectly fine with this version of RAS. But now when I try to create sub-reports using RAS 9.2 I am constantly facing this error,
"Logon failed. Details: Object reference not set to an instance of an object. Error in File C:\WINNT\TEMP\{A9A21215-B54B-4BF6-B028-20EA73476373}.rpt: Unable to connect: incorrect log on parameters.
"
Following is the code snippet for running a report containing sub-reports.
/////////////////////////
Report_EquityManager objManager = new Report_EquityManager();
System.Data.DataSet rptDS = objManager.GetDataSet(objEntity);
ReportClientDocument rptDoc = new ReportClientDocument();
rptDoc.ReportAppServer = "RASServerName";
//Below path exists on server where RAS service is running
//xyz.rpt contains sub-reports viz. s1 and s2
object ReportPath = "C:\MyFolder\xyz.rpt"
ISCRDataSet ds = DataSetConverter.Convert(rptDS);
rptDoc.Open(ref ReportPath,0);
rptDoc.SubreportController.SetTableLocation("s1", ds.Tables[0], ds.Tables[0]);
rptDoc.SubreportController.SetTableLocation("s2", ds.Tables[1], ds.Tables[1]);
this.CrystalReportViewer1.EnableDrillDown = false;
this.CrystalReportViewer1.DisplayGroupTree = false;
this.CrystalReportViewer1.ReportSource = rptDoc;
this.CrystalReportViewer1.DataBind();
//////////////////
Problem is that the error occurs at the second call of SetTableLocation. And when I comment that line, the error occurs after successfully executing the code without any exception. This time I am not able to trace where it is going wrong.
Is there any solution to resolve the problem.
Thanks,
Yatin