maybe too big to show
解决方案 »
- 关于datatable和datareader转换为IList的性能
- winform问题 帮忙解决一下
- datagirdview的问题
- 怎样在右键单击Form标题栏时显示自定义的菜单项?
- 初次用C#,关于openFileDialog,赐教
- Console.WriteLine会阻塞?
- 安装程序制作:如何打包注册一个Ocx控件?(在线,立即结贴)
- 请问:在winform中listbox不能Item.add添加有value的项,请问怎么解决这个问题
- listview中子项的读取的问题!实在是不了解
- WeifenLuo.WinFormsUI.Docking 控制窗体浮动显示大小
- 简单的问题
- 升星星,散分!!!!!!!!!!!!!!!
There are some way to solve these question,
e.g:render the images to local and embeded them into your html.
i give your my source code:byte[] result = null;
string historyID = null;
string format = "HTML4.0";
//the images local path
string imagePath=@"../ReportFile/images/"+Guid.NewGuid()+"/";
if (!Directory.Exists(Server.MapPath(imagePath)))
{
Directory.CreateDirectory(Server.MapPath(imagePath));
}
//tell reporting service that the render images be link
string devInfo = "<DeviceInfo><Toolbar>False</Toolbar><HTMLFragment>True</HTMLFragment><StreamRoot>"+imagePath+"</StreamRoot></DeviceInfo>";//get report's html (containing images' local link)
result = rs.Render(sReportPath, format, historyID, devInfo, proxyParameters, credentials,
showHideToggle, out encoding, out mimeType, out reportHistoryParameters, out warnings,
out streamIDs);
sh.SessionId=rs.SessionHeaderValue.SessionId;
//rs.SessionHeaderValue=null;
//get images local
foreach (string streamID in streamIDs)
{
byte[] image = rs.RenderStream(sReportPath,format,streamID,
null,devInfo,proxyParameters,out encoding,out mimeType); FileStream stream = File.Open(Server.MapPath(imagePath) + streamID,FileMode.OpenOrCreate,FileAccess.ReadWrite,FileShare.Read);
stream.Write(image, 0, image.Length);
stream.Close();
}//end
then you can render the result
但从rs的帮助来看,是应该使用RenderStream方法,是否还有其他地方需要配置?
ie can open these files,or your image have no lines
通过ReportingSerive.Render方法嵌入到自己的页面,表格能够正常显示,但分析图形则显示不了。
/******************************************************************前些时间我有遇过同样的情况,是因为Reporting Services并没有完全安装好,它还有一个服务,不知你是否安装完?这里是指所布置的服务器!! 有问题再问