run report through call reporting services web service

 

 

SQLRS2005.ReportExecutionService rs = new SQLRS2005.ReportExecutionService();
rs.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
rs.UseDefaultCredentials = true;
					
byte[] result = null;
// Path of the report in reporting services (like /OrgName_MSCRM/4.0/{ID_OF_The_Report}
string reportPath = System.Web.HttpUtility.UrlDecode(reportName);
string format = "PDF";
string historyID = null;
string devInfo = @"<DeviceInfo><Toolbar>False</Toolbar><StartPage>0</StartPage></DeviceInfo>";


SQLRS2005.ExecutionInfo info = rs.LoadReport(reportPath,historyID);

// Prepare report parameter.
SQLRS2005.ParameterValue parameter = new SQLRS2005.ParameterValue();
// filtered View is the name of the CRM filtered view
parameter.Name = filteredView;

// sqlFilter is the prefiltering SQL query
parameter.Value = sqlFilter;
				
rs.SetExecutionParameters(new SQLRS2005.ParameterValue[] { parameter } , null); 

string strExtensions; 
string encoding;
string mimeType;

SQLRS2005.Warning[] warnings = null;
string[] streamIDs = null;
					
result = rs.Render(exportType, devInfo, out strExtensions, out 
						mimeType, out encoding, out warnings, out streamIDs); 


 http://social.microsoft.com/Forums/zh-CN/crm/thread/c6d77fdd-4a9e-4a8c-8ec6-6ed0253693f6

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值