我用水晶报表的推模式制作报表,一切都已经 好了,打包的时候我把一些模块都加上了,本机上没有任何问题,可是当我要装到一个没有装水晶报表的机器上时,用到水晶报表就会弹出登录的对话框。我是用sql语句从数据库中提取数据,然后给dataset,就是推模式,推模式也要设置登陆信息吗?资料说好像不需要啊!各位请帮忙,多谢了。
解决方案 »
- C# winform 资源文件如何编译后成为独立文件
- 寻求Socket编程服务端与客户端端口多的问题解决方案
- 超级郁闷的错误 大家帮忙看看这是错误?(c# net环境下)
- 如何获取HttpWebRequest中的Header信息?
- 同样的CS文件, 在Delphi2006和Visual Studio20058下分别编译,运行结果相差很多
- 用c#怎么将SQL数据导入textbox中
- 根据数组里的值 查询数据库 做循环查询 提示读不出数据
- DataGrid控件问题
- WPF鼠标事件问题
- 关于EventLog日志权限的问题。
- 图象显示不能及时刷新,请大家帮忙,很急很急呀!!!!
- 关于xml.Serialize的问题,比较麻烦
如果你用到了子报表,一定要处理://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"]);