I have a question regarding the possibility of Binding Un-type dataset to Un-type rpt file.I have seen some people's code on internet,it seems can be done,but it does not work out at my code,
can you give me any guidance on this subject?I have configured "RptDis1.rpt" with data fields, and open it with ReportDocument object, nevertheless after i use ReportDocument.SetDatasouce method to bound a un-typed dataset to the ReportDocument,neither the reportviewer nor export pdf show any record or data in it. Do you have the same problem before like this?
public void exportPdf(System.Data.DataSet ds)
{
private string _localCrLocation = @"C:\RptDis1.rpt"
ReportDocument oRD = new ReportDocument();
ExportOptions oExo = new ExportOptions();
DiskFileDestinationOptions oExDo = new DiskFileDestinationOptions(); oRD.Load(_localCrLocation);
oRD.SetDataSource(ds.Tables[0]);
oExDo.DiskFileName = @"c:\erf.pdf";
oExo = oRD.ExportOptions;
oExo.ExportDestinationType =ExportDestinationType.DiskFile;
oExo.ExportFormatType =ExportFormatType.PortableDocFormat;
oExo.DestinationOptions = oExDo;
oRD.Export();
oRD.Close();
}
can you give me any guidance on this subject?I have configured "RptDis1.rpt" with data fields, and open it with ReportDocument object, nevertheless after i use ReportDocument.SetDatasouce method to bound a un-typed dataset to the ReportDocument,neither the reportviewer nor export pdf show any record or data in it. Do you have the same problem before like this?
public void exportPdf(System.Data.DataSet ds)
{
private string _localCrLocation = @"C:\RptDis1.rpt"
ReportDocument oRD = new ReportDocument();
ExportOptions oExo = new ExportOptions();
DiskFileDestinationOptions oExDo = new DiskFileDestinationOptions(); oRD.Load(_localCrLocation);
oRD.SetDataSource(ds.Tables[0]);
oExDo.DiskFileName = @"c:\erf.pdf";
oExo = oRD.ExportOptions;
oExo.ExportDestinationType =ExportDestinationType.DiskFile;
oExo.ExportFormatType =ExportFormatType.PortableDocFormat;
oExo.DestinationOptions = oExDo;
oRD.Export();
oRD.Close();
}
解决方案 »
- asp.net中使用ObjectDataSource控件循环图片时报未能找到TypeName属性指定的类型
- asp.net 实现无刷新聊天室原码
- 求助:使用服务器端验证后,怎么没有通过还是会刷新页面啊
- 高分求解以下问题?(急!!!在线等待………)
- 问卷调查~!(大家用什么方法体现页面左边的功能菜单列表?用微软的树还是js的效果?)
- asp.net的mvc5, 看起来还不错,但有几个问题很困惑
- DataGrid控件使用,(100分!!!!!!!!!!)
- *****救名呀!!!使用水晶报表出现让我购买的提示********
- 怎样在 ASP.net 里用程序播放 MIDI声音文件?
- 用DataReader来读数据,如果数据中有空值,它就会产生错误,说数据无法转换,这是为什么?
- 最后30分,问一个用JavaScript控制RadioButtonList的enable属性的问题
- 在asp.net中,如何與sybase數據庫相連???
we've never run into trouble as yours.
if u guys not showing off ur english words here as fake yankeei think that would be a lot of experienced programmers would help you.
Top
回复人: mathewyang() ( ) 信誉:73 2005-08-25 15:02:00 得分: 0
噢,其实我在bussinessobject.COM那里问过相同的问题,但没有人答复,所以我就顺带抄了过来。
我过往发的贴都是中文的。英文很多人都会,我没必要逞这样的能。
Top