首页 > 其他 > 详细

水晶报表 Issue

时间:2014-02-07 16:16:10      阅读:611      评论:0      收藏:0      [点我收藏+]

pull模式 代码如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
private void ShowCrystalReport()
{
string strDBServer = Application["DBServer"].ToString();
string strDBName = Application["DBName"].ToString();
string strUserId = Application["DBUserID"].ToString();
string strPassword = Application["DBPassword"].ToString();
//连接代码
CrystalReportSource1.ReportDocument.Load(Server.MapPath("Report/JPInvoice.rpt"));
CrystalReportSource1.ReportDocument.SetDatabaseLogon(strUserId, strPassword, strDBServer, strDBName);
//设置参数
CrystalReportSource1.ReportDocument.SetParameterValue("Invoice_No_From", strInvoiceForm);
CrystalReportSource1.ReportDocument.SetParameterValue("Invoice_No_To", strInvoiceTo);
CrystalReportSource1.ReportDocument.SetParameterValue("TRX_Date_From", strDateFrom);
CrystalReportSource1.ReportDocument.SetParameterValue("TRX_Date_To",strDateTo );
CrystalReportSource1.ReportDocument.SetParameterValue("Org_ID", "86");
CrystalReportSource1.ReportDocument.SetParameterValue("SOB_ID", "2029");
CrystalReportSource1.DataBind();
CrystalReportViewer1.ReportSource = CrystalReportSource1;
CrystalReportViewer1.DataBind();
}

 开始遇到的问题是 “无法加载数据库 crdb_oracle.dll

解决方法:更新pack,由于用的是vs2008 所以安装了VS2008SP1 

 

后来又遇到问题 您请求的报表需要更多信息 如图:

bubuko.com,布布扣

解决方法 修改了代码

  

水晶报表 Issue

原文:http://www.cnblogs.com/clairelss/p/3539402.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!