您是需要rpx报表文件,运行时绑定数据,如果是这样先参考以下代码:
- public static SectionReport AddDataSectionSetDataSource()
- {
- SectionReport report = new SectionReport();
-
- report.LoadLayout("..\\..\\SectionReport2.rpx");
- Data.OleDBDataSource ds = new Data.OleDBDataSource();
- ds.ConnectionString = Properties.Resources.ConnectionString;
- ds.SQL = Constants.cmdText;
- report.DataSource = ds;
- System.Xml.XmlTextWriter xtw = new System.Xml.XmlTextWriter("..\\..\\SectionReport2.rpx", null);
- report.SaveLayout(xtw);
- return report;
-
-
- }
复制代码
|