!!!急--水晶报表这样错误怎么办-“/reporttest”应用程序中的服务器错误。登录失败

Dicky81 2005-09-29 05:11:50
“/reporttest”应用程序中的服务器错误。
--------------------------------------------------------------------------------

登录失败。


[LogOnException: 登录失败。]
.F(String , EngineExceptionErrorID
) +506
.A(Int16 , Int32 ) +537
CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext reqContext) +539
CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext) +189
CrystalDecisions.Web.ReportAgent.u(Boolean N) +164
CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) +108
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1489
这是什么错误我该怎么办!
...全文
95 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
singlepine 2005-10-01
  • 打赏
  • 举报
回复
http://blog.csdn.net/BennyMavis/category/66503.aspx
lyb_abiandbel 2005-09-30
  • 打赏
  • 举报
回复
如果你用的是水晶报表的推模式,一般不用设置登陆信息,但是要这样写:obj.SetDataSource(this.ds.Tables["tablename"]);如果你写成了obj.SetDataSource(this.ds)就会有登陆框的。

如果你用的是水晶报表的拉模式,你就一定要写上登陆信息:

crReportDocument = new OracleReport();

//Set the crConnectionInfo with the current values stored in the report
crConnectionInfo = crReportDocument.Database.Tables[0].LogOnInfo.ConnectionInfo;

/* Populate the ConnectionInfo Objects Properties with the appropriate values for
the ServerName, User ID, Password and DatabaseName. However, since Oracle
works on Schemas, Crystal Reports does not recognize or store a DatabaseName.
Therefore, the DatabaseName property must be set to a BLANK string. */
crConnectionInfo.DatabaseName = "";
crConnectionInfo.ServerName = "Your Server Name";
crConnectionInfo.UserID = "Your User ID";
crConnectionInfo.Password = "Your Password";

//Set the CrDatabase Object to the Report's Database
crDatabase = crReportDocument.Database;

//Set the CrTables object to the Tables collection of the Report's dDtabase
crTables = crDatabase.Tables;

//Loop through each Table object in the Tables collection and apply the logon info
//specified ealier. Note this sample only has one table so the loop will only execute once
foreach (Table crTable in crTables)
{
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo (crTableLogOnInfo);

// if you wish to change the schema name as well, you will need to set Location property as follows:
// crTable.Location = "<new schema name>." + crTable.Name;
}

//Set the ReportSource of the CrystalReportViewer to the strongly typed Report included in the project
crystalReportViewer1.ReportSource = crReportDocument;

还有一点要注意:
如果你用到了子报表,一定要处理:

//Go through each sections in the main report and identify the subreport by name
crSections = crReportDocument.ReportDefinition.Sections;

foreach(Section crSection in crSections)
{
crReportObjects = crSection.ReportObjects;
//loop through all the report objects to find all the subreports
foreach(ReportObject crReportObject in crReportObjects)
{
if (crReportObject.Kind == ReportObjectKind.SubreportObject)
{
//you will need to typecast the reportobject to a subreport
//object once you find it
crSubreportObject = (SubreportObject)crReportObject;

//open the subreport object
crSubReportDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName);
//Once the correct subreport has been located pass it the
//appropriate dataset
if(crSubReportDoc.Name == "FirstSub")
{
//crSubReportDoc.Database.Tables[0].SetDataSource(ds);
crSubReportDoc.SetDataSource(ds);
}
}
}
}
crystalReportViewer1.ReportSource = crReportDocument;

同样crSubReportDoc.SetDataSource(ds);改为:crSubReportDoc.SetDataSource(ds.Tables["tablename"]);

http://dev.csdn.net/develop/article/76/76324.shtm
Crystal Reports 9.2 文版(水晶报表) 下载,,软件版本:9.2.0.448不过现已出了Crystal Reports Professional v9.2.2.634 (c) Crystal Decisions,有足够的空间就提供.这是一个很不错的报表控件,我相信很多朋友都听说过吧!Crystal Reports 用于处理数据库,帮助用户分析和解释重要信息。使用 Crystal Reports 可以方便地创建简单报表,同时它也提供了创建复杂或专用的报表所需的整套工具。 创建所能想象的任何报表 Crystal Reports几乎可以从任何数据源生成您需要的报表。内置报表专家在您生成报表和完成一般的报表任务过程,会一步一步地指导您进行操作。报表专家通过公式、交叉表、子报表和设置条件格式帮助表现数据的实际意义,揭示可能被隐藏掉的重要关系。如果文字和数字确实不够充分,则用地理地图和图形进行形象的信息交流。 将报表扩展到 Web Crystal Reports 的灵活性并未停留在创建报表这一功能上 ?您可以用各种各样的格式发布报表,包括用 Microsoft 的 Word 和 Excel 发布、通过电子邮件甚至 Web 发布。高级的 Web 报表功能允许工作组的其他成员在他们自己的 Web 浏览器查看或更新共享报表。 将报表并入应用程序通过将 Crystal Reports 的报表处理功能整合到自己的数据库应用程序应用程序和 Web 开发人员可以节省开发时间并满足用户的需求。Crystal Reports 支持大多数流行的开发语言,可以方便地在任何应用程序添加报表。 不论您是 IT 行业的站点管理员,还是营销推广经理,也无论您是金融业的数据库管理员还是 CEO,Crystal Reports 都堪称是一个功能强大的工具,它可以帮助每一个人分析、解释重要信息。感谢 revenant 上传!

4,819

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧