水晶报表问题? 水晶报表显示在网页上时不能靠左显示,打印预览时右侧部分不能显示,怀疑打印时不能全部显示,请问各位高手如何解决?谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 protected void LoadReport() { try { if(this.ReportName != "") { //报表路径 string ReportPath = Request.ServerVariables["APPL_PHYSICAL_PATH"]; ReportPath += "Reports\\" + ReportName + ".rpt"; if(!File.Exists(ReportPath)) { //01.010.00002 = 报表文件不存在 UIUtil.ShowErrorMessage(Page,base.SysParams[3],"01.010.00001"); return; } crReportDocument.Load(ReportPath) ; UpdatePrintOptions(); //连接数据库 //server=proserver;uid=sa;pwd=123;database=ps_data char[] chSplit = {'=',';'}; string[] strInfos = base.SysParams[2].Split(chSplit); //登录数据库 //this.ConnectDataBase(strInfos[1],strInfos[7],strInfos[3],strInfos[5]); //重新设定数据源 SearchBase searchBase = RptFactory.BuildSearchClass(this.ReportName); System.Diagnostics.Debug.Assert(searchBase != null); DataSet ds = searchBase.GetPrintDataSet(SysParams,(ConditionCollection)Session["SearchCondition"]); if(!System.DBNull.Value.Equals(ds) && ds.Tables.Count > 0) { crReportDocument.SetDataSource(ds.Tables[0]); crReportDocument.Refresh(); } //获得报表参数 GetParams(searchBase); //显示报表 this.CrystalReportViewer1.ReportSource = crReportDocument; this.CrystalReportViewer1.DataBind(); } } catch(EngineException ee) { if(ee.ErrorID == EngineExceptionErrorID.LogOnFailed) { //登录错误 UIUtil.ShowErrorMessage(Page,base.SysParams[3],"01.010.00002"); } else if(ee.ErrorID == EngineExceptionErrorID.DataSourceError) { //数据源错误 UIUtil.ShowErrorMessage(Page,base.SysParams[3],"01.010.00002"); } else { //抛出系统异常 throw new Exception(ee.Message ); } } } wpf中窗口跳转和页面跳转的问题 java中的FileChannel和MappedByteBuffer在C#中应该用什么来替代 WPF的菜单Disable了还能被点击? 请教c#高手 达人们欢迎讨论啦!form窗体关闭的问题 求算法:如何实现水波的效果! 请问在C#如何通过IP获取局域网中某台电脑的硬盘序列号? 请问,怎么在windform中的添加一列button,点击这个button会弹出一个新窗口,显示和该行有关的其他信息。 Treeview控件问题 怎样在c#中调用WORD的COM里的PRINTOUT()方法? 求C#中验证码的做法 请教简单问题!
{
try
{
if(this.ReportName != "")
{
//报表路径
string ReportPath = Request.ServerVariables["APPL_PHYSICAL_PATH"];
ReportPath += "Reports\\" + ReportName + ".rpt"; if(!File.Exists(ReportPath))
{
//01.010.00002 = 报表文件不存在
UIUtil.ShowErrorMessage(Page,base.SysParams[3],"01.010.00001");
return;
}
crReportDocument.Load(ReportPath) ;
UpdatePrintOptions(); //连接数据库
//server=proserver;uid=sa;pwd=123;database=ps_data
char[] chSplit = {'=',';'};
string[] strInfos = base.SysParams[2].Split(chSplit); //登录数据库
//this.ConnectDataBase(strInfos[1],strInfos[7],strInfos[3],strInfos[5]); //重新设定数据源
SearchBase searchBase = RptFactory.BuildSearchClass(this.ReportName);
System.Diagnostics.Debug.Assert(searchBase != null);
DataSet ds = searchBase.GetPrintDataSet(SysParams,(ConditionCollection)Session["SearchCondition"]);
if(!System.DBNull.Value.Equals(ds) && ds.Tables.Count > 0)
{
crReportDocument.SetDataSource(ds.Tables[0]);
crReportDocument.Refresh();
}
//获得报表参数
GetParams(searchBase); //显示报表
this.CrystalReportViewer1.ReportSource = crReportDocument;
this.CrystalReportViewer1.DataBind();
}
}
catch(EngineException ee)
{
if(ee.ErrorID == EngineExceptionErrorID.LogOnFailed)
{
//登录错误
UIUtil.ShowErrorMessage(Page,base.SysParams[3],"01.010.00002");
}
else if(ee.ErrorID == EngineExceptionErrorID.DataSourceError)
{
//数据源错误
UIUtil.ShowErrorMessage(Page,base.SysParams[3],"01.010.00002");
}
else
{
//抛出系统异常
throw new Exception(ee.Message );
}
}
}