首页 vS2008_Report

vS2008_Report

举报
开通vip

vS2008_ReportvS2008_Report Vs2008 创建一个报表 这个系列文章主要从实例的方式来说明怎么用Visual Studio 2008(2005也一样提供这个功能)做RDLC报表的开发,最后再对此系列做总结,讲述一些概念的东西。 作为开遍,我不想过多的讲于概念,主要来说明怎样来实现一个简单的RDLC报表。 二(创建一个简单RDLC项目 1. 打开Visual Studio 2008,新建一个ASP.NET Web Application项目,如下图所示。 2. 在项目中新建两个文件夹,分别叫DataEn...

vS2008_Report
vS2008_Report Vs2008 创建一个报表 这个系列文章主要从实例的方式来说明怎么用Visual Studio 2008(2005也一样提供这个功能)做RDLC报表的开发,最后再对此系列做总结,讲述一些概念的东西。 作为开遍,我不想过多的讲于概念,主要来说明怎样来实现一个简单的RDLC报表。 二(创建一个简单RDLC项目 1. 打开Visual Studio 2008,新建一个ASP.NET Web Application项目,如下图所示。 2. 在项目中新建两个文件夹,分别叫DataEntity和ReprotTemplate,如下图, 至于这两个文件夹主要用来存放什么,在下面我们会讲到,这里先不说。 3. 此项目需要引用Microsoft.Reporting.WinForms和System.Windows.Forms,所以我们需要右击上图中的References,然后在.NET Tab中找到我们所需要引用的Reference,点击Ok,添加到我们的引用中去。 4. 右击我们新建的DataEntity文件夹,选择Add New Item…,选择左边的Categories中的Data,然后选择右边的DataSet,输入你的DataSet 名字,然后点击Add到这个文件夹下,至此我们知道DataEntity文件夹用来存放数据集。 5. 点击Visual Studio IDE左边的Server Explorer(如果左边没有,可以在View菜单中找到),然后选择一个Database中的表,选择拖到DataSet中(如果还没有IDE中还没有Database影射,那么可以选择Tools Connect To Database…来连接到你需要的Database),当然这个DataSet中的表也可以自己定义(在编辑区点击右键,选择新增表,然后在表中增加你需要的字段)。 6. 右击我们新建的ReprotTemplate文件夹,选择Add New Item…,选择左边的Categories中的Reporting,然后选择右边的Report,输入你需要的名字,点击Add,就样我们就把一个Report的模板加入到ReprotTemplate文件夹中了,Report模板的编辑区如下面第二张图所示。 7. 下面我们要做的事情就是编辑这个报表模板,首先我们选择这个报表所需要的数据集,点击Report菜单下面的Data Source,在弹出的Report Data Source中,选择我们添加在DataEntity中那个DataSet的表,如下图所示。这里也就说明了,DataEntity中存放的是RDLC模板中所需要的数据集,为RDLC提供数据服务(除了DataSet以外,还有很多数据集,我们以后的内容中会讲解这此)。 8. 然后我们在Visual Studio IDE的左边的ToolBox中拖一个Table到我们的报表编辑区中,这个Table默认有三行三列,第一行是标 快递公司问题件快递公司问题件货款处理关于圆的周长面积重点题型关于解方程组的题及答案关于南海问题 行,第二行是数据绑定行,第三行是表的页脚行(如果你不想显示其中的一部分你可以选中一行,然后右击这一行的最左边,取消或者选中即可)。如下图所示,我们在标题行对应的字段中输入标题名,你也可以右击到某一列,选择新增一列在选择列的左边或者右边。 接下来要做的事情就是为这个表选择数据集,选择表,右击表,选择Properties,在弹出的Table Properties General Tab的DataSet Name中选择我们刚到加入的数据集,你需要记住这个名字,因为有的时候你可能会用到。 9. 绑定数据到数据行,选择数据行中的第一列,右击选择Expression…,然后在Expression窗口中,选择Category中的,DataSets,然后Item中自动的会列出你已经增加的Data Source,选择一个Data Source,他会为你列出所有的字段,选中你要的字段双击即可到上面的编辑框中(默认的没有直接绑定到每一行的数据),你也可以在编辑框中自 己输入如Fields!Category.Value来选择数据,其中Category是字段名,当你输入Fields!后会自动提示你有哪此字段。选择后点击OK,其它的字段也以同样的方法设置即可。 10. 上面我们已经完成了新增数据集,设置报表模板,为模板中的控件绑定数据集,那下面我们就来看一下如何提供数据给这个数据集,以及如何实现报表。 首先,我们在项目的根目录下新建一个类叫CustomPageBase.cs,他主要用来实现生成报表,代码如下: 19 using System; 20 using System.Data; 21 using System.Configuration; 22 using System.Linq; 23 using System.Web; 24 using System.Web.Security; 25 using System.Web.UI; 26 using System.Collections.Generic; 27 using Microsoft.Reporting.WinForms; 28 29 namespace RCLC 30 { 31 public class CustomPageBase : Page 32 { 33 public void GetReportMultipleDataSourceFile(List reportDateSource, string TemplatePath, List parameterList, string FileType) 34 { 35 string reportFormat = FileType; 36 string outputfile = "Report."; //报表名称 37 ReportViewer rview = new ReportViewer(); 38 rview.ProcessingMode = ProcessingMode.Local; 39 rview.LocalReport.ReportPath = Server.MapPath(TemplatePath); 40 rview.LocalReport.DataSources.Clear(); 41 foreach (ReportDataSource re in reportDateSource) 42 { 43 rview.LocalReport.DataSources.Add(re); 44 } 46 if (parameterList.Count > 0) 47 rview.LocalReport.SetParameters(parameterList); 48 string mimeType, encoding, extension, deviceInfo; 49 string[] streamids; 50 Warning[] warnings; 51 deviceInfo = "" + "True" + ""; 52 53 byte[] bytes = rview.LocalReport.Render(reportFormat, deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings); 54 55 //这里可以输入产生报表的时候有哪些警告信息 56 //if (warnings != null && warnings.Length > 0) 57 //{ 58 // LoggingManager log = LoggingManager.GetLoggingManager(); 59 // foreach (Warning w in warnings) 60 // { 61 // log.Info(w.Message); 62 // } 63 //} 64 HttpContext.Current.Response.Buffer = true; 65 HttpContext.Current.Response.Clear(); 66 HttpContext.Current.Response.ContentType = mimeType; 67 HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + outputfile + extension + ";"); 68 HttpContext.Current.Response.BinaryWrite(bytes); 69 HttpContext.Current.Response.End(); 70 } 71 } 72 } 然后让Default.aspx.cs继承CustomPageBase,然后在Default页面中新增一个Button, 在Button的事件中提供产生Report所需要的参数,如下: 1 using System; 2 using System.Collections; 3 using System.Configuration; 4 using System.Data; 5 using System.Linq; 6 using System.Web; 7 using System.Web.Security; 8 using System.Web.UI; 9 using System.Web.UI.HtmlControls; 10 using System.Web.UI.WebControls; 11 using System.Web.UI.WebControls.WebParts; 12 using System.Data.SqlClient; 13 using System.Collections.Generic; 14 using System.Xml.Linq; 15 using Microsoft.Reporting.WinForms; 16 using RCLC.DataEntity; 17 18 namespace RCLC 19 { 20 public partial class _Default : CustomPageBase 21 { 22 protected void Page_Load(object sender, EventArgs e) 23 { 24 25 } 26 27 protected void ButtonReportGenerate_Click(object sender, EventArgs e) 28 { 29 List reportDataSource = new List(); 30 RportDataSet ds = new RportDataSet(); 31 string templatePath = string.Empty; 32 string totalRecords = string.Empty; 33 34 //获得数据 35 SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["LoggingConnectionString"].Conn ectionString); 36 SqlCommand command = conn.CreateCommand(); 37 command.CommandType = CommandType.Text; 38 command.CommandText = "SELECT * FROM T_BC_LOGS"; 39 SqlDataAdapter da = new SqlDataAdapter(command); 40 da.Fill(ds.T_BC_LOGS); 41 42 //指定报表模板 43 templatePath = "ReportTemplate/LogReport.rdlc"; 44 45 //把获取的数据集合提供给在报表中名为RportDataSet_T_BC_LOGS数据集 46 reportDataSource.Add(new ReportDataSource("RportDataSet_T_BC_LOGS", ds.T_BC_LOGS)); 47 List parameterList = new List(); 48 //Generate Report, 报表可以生成PDF,EXCEL及以其它形式,根据需求去设置 49 GetReportMultipleDataSourceFile(reportDataSource, templatePath, parameterList, "pdf"); 50 } 51 } 52 } 53 最后,选择这个页面,点击button就呆以产生你所需要的页面了,如下图所示。 RDLC 报表系列(二) 报表中插入图片 一(写作前提 原本的 计划 项目进度计划表范例计划下载计划下载计划下载课程教学计划下载 把在RDLC报表中插入图片的内容放到后期来讲,但是看到顶贴的朋友们对此内容的需求,所以我改变原来计划,把此节内容提前来讲,希望能及时的给予你帮助。 二(在RDLC报表中插入图片 首先我要声明,此篇我们是在([原创] RDLC 报表系列(一) 创建一个报表)文章的基础上来讲,如果还不了解的可以先看这篇文章。 下面我们就来谈一下怎么加入图片到RDLC报表中。 1. 首先我们在项目文件中新建一个images文件夹,他用来存放我们报表中所要使用的图片,我们可以插入一个图片文件,如下图所示。 2. 打开ReportTemplate文件夹中的报表文件,点击报表的编辑区,接着选 择Report菜单下的Enabedded Images…,在弹出的Enabedded Images对话框中,选择NewImage,选择我们刚才加入到images中的那个图片文件,加完后如下面第二张图所示,然后点击OK按钮。 3. 上面我们已经完成了把图片加入到我们的报表中,但是我们如何应用它呢,好,现在我们就来解决这个问题,首先选择Report菜单下的Page Header(因为我要把图片加载到每一页的页首,当然你也可以选择Page Footer,即页脚),这个时间就可以在RDLC报表中看到页首了。 接下来,我们在Visual Studio 2008 IDE 左边的ToolBox中拖一个Image控件到我们报表的Header区,如下图所示。 点击图片,“在Visual Studio 2008 IDE的右边点击Properties”,然后在Source属性中选择Embedded,这里在Value中就可以选择你刚才加入的图片了,如下图所示。 4. 保存并选择代码,就可以在你的报表页首部分看到这个图片了。至此我们完成了把图片插入到RDLC报表中。选择结果如下所示。 RDLC 报表系列(三) 参数、常量及常用表达式的使用 一(写作前提 前两篇我们讲到了如何在RDLC中如何插入和使用图片,除了图片以外,在报表中我们往往需要使用一些特定 格式 pdf格式笔记格式下载页码格式下载公文格式下载简报格式下载 或在特定的条件下使用特定的数据,或对数据做下些处理,并 且可能存在一些数据是要我们从ASP.NET程序提供的,所以这篇我们主要讲RDLC报表中如何使用参数、表达式及常用常量。 二(本文内容 1. 怎样通过ASP.NET 程序为RDLC报表提供参数 2. 怎样使用RDLC提供的变量及常用常量 3. 常用表达式的使用 4. 总结 三( ASP.NET 程序为RDLC报表提供参数 在我们的报表中,往往需要从ASP.NET程序提供一些参数显示在报表的指定位置,第一篇中我们已经讲过怎样传递一个数据集,但是我们只需要一个值,总不能把这个值放到DataSet中来传输吧(因为DataSet本其实是由XML结成,在传递过程中需要比data本身更多的资源),所以这个时候我们就需要知道如何传递一个参数到RDLC报表。下面我们就来讲一讲。 不知道大家还记不记得我在第一篇中的Default.aspx.cs中写的一个Button事件,如下。 1 protected void ButtonReportGenerate_Click(object sender, EventArgs e) 2 { 3 List reportDataSource = ne List(); 4 RportDataSet ds = new RportDataSet(); 5 string templatePath = string.Empty; 6 string totalRecords = string.Empty; 7 8 SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["LoggingConnectionString"].Conn ectionString); 9 SqlCommand command = conn.CreateCommand(); 10 command.CommandType = CommandType.Text; 11 command.CommandText = "SELECT * FROM T_BC_LOGS"; 12 SqlDataAdapter da = new SqlDataAdapter(command); 13 da.Fill(ds.T_BC_LOGS); 14 reportDataSource.Add(new ReportDataSource("RportDataSet_T_BC_LOGS", ds.T_BC_LOGS)); 15 16 //TemplateFiles 17 templatePath = "ReportTemplate/LogReport.rdlc"; 18 List parameterList = new List(); 19 ////Generate Report 20 GetReportMultipleDataSourceFile(reportDataSource, templatePath, parameterList, "pdf"); 21 } 其中我定义了一个泛型变量,如下: List parameterList = new List(); 但是我并没有给这个变量赋任何值,我要告诉大家的就是这里变量就是为我们传递参数提供的。好,下面我们就来讲一下怎么传递这个参数。 1. 首先我们打开ReportTemplate文件夹中的RDLC报表模板,点击报表的编辑区,然后打开Report菜单下的Report Parameters…,在Report Parameters窗口中,我们点击Add 按钮,接着我们输入这个参数的名称与类型(这个名称你要记住,因为下面的编程中要用到),如果这个参数提供的时候不一定每次都有值,那么我们则要选中 All null value的复选框,如下图所示,如果你有多个参数则以此方法添加即可。 2. 我们从Visual Studio IDE左边的ToolBox中拖一个TextBox到这个报表模板的页首(在我的报表中,复杂的表头大部分都是通过TextBox来实现的,可以设计 TextBox的边框及字体等属性来设计,所以后面的内容中我不会再提如何设计复杂的报表页首),右击这个TextBox,选择Expression…,在Expression窗口中,我们选择Category中的Parameters,然后双击最右边你刚刚加的那个参数,点击确定即可。至此,对报表的设计完成了。 3. 修改Default.aspx页面中的程序如下所示: 1 protected void ButtonReportGenerate_Click(object sender, EventArgs e) 2 { 3 List reportDataSource = new List() 4 RportDataSet ds = new RportDataSet(); 5 string templatePath = string.Empty; 6 string totalRecords = string.Empty; 7 8 SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["LoggingConnectionString"].Conn ectionString); 9 SqlCommand command = conn.CreateCommand(); 10 command.CommandType = CommandType.Text; 11 command.CommandText = "SELECT * FROM T_BC_LOGS"; 12 SqlDataAdapter da = new SqlDataAdapter(command); 13 da.Fill(ds.T_BC_LOGS); 14 reportDataSource.Add(new ReportDataSource("RportDataSet_T_BC_LOGS", ds.T_BC_LOGS)); 15 16 //TemplateFiles 17 templatePath = "ReportTemplate/LogReport.rdlc"; 18 List parameterList = new List(); 19 //为参数Parameter1传递This is a parameter 20 parameterList.Add(new ReportParameter("Parameter1", "This is a parameter")); 21 ////Generate Report 22 GetReportMultipleDataSourceFile(reportDataSource, templatePath, parameterList, "pdf"); 23 } 运行结果如图所示: 四(使用RDLC提供的变量及常用常量 在RDLC报表中,有些你想得到的功能是用ASP.NET代码完成不了的,比如说这个报表总共有多少页,当前在第几页等等,这些功能我们就要借助RDLC表达式中自带的一些常量了,下面就让我们来谈谈这此常量。 1. 显示总共页数及当前页 a) 从Visual Studio IDE左边的ToolBox中拖两个TextBox到报表的页首。 b) 右击第一个TextBox,选择Expression…,在Expression窗口的Category中选择Globals,然后在Item中双击选择TotalPages,这个变量就是总共多少页,为了方便我们查看,我们把在上面显示的表达式进行修改如下: ="Total of "+Globals!TotalPages.ToString() c) 按上面的加入总页的方式,右击第二个TextBox选择Expression…,然后在选择Globals,接着选择PageNumber,这就是当前的页数,同样为了方便查看,修改如下: =" Total of "+Globals!PageNumber.ToString() 注意: 刚才我们选择总页数和当前页数的时候,是不是发现除了这两个还有好几个常量,现在解释如下: 生成报表的时间 ExecutionTime 当前的页号 PageNumber 包含报表的文件路径 ReportFolder 报表的名称 ReportName 执行报表Server的路径(这里没有用Server,所以没有,如果用ReportS ReportServerUrl ervice那就就存在了) 总行数 TotalPages 当前执行报表的人 UserID 执行报表Server的系统语言 Language 2. 为RDLC报表中数据行增加自动编号 a) 为了完成这个功能,我们完成这个功能,现在我们为报表中已经存在的Talbe在最左边加一个字段叫S/N(这篇中没有讲表从哪里来,请参阅[原创] RDLC 报表系列(一) 创建一个报表)。 b) 还记得我当时给这个表绑定了一个数据集吗,选点右击表,选择Properties,从里面拷出那个数据集的名称。 c) 右击S/N的数据字段,选择Expression,在Expression的Category中选择Common FunctionsàMiscellaneous,然后双击右边Item中的RowNumber,在其参数中输入数据集的名称,如下所示: =RowNumber("RportDataSet_T_BC_LOGS") 或=RowNumber(Nothing)也可以实现自动编号 五(常用表达式的使用 1. 连接字符 =Fields!FirstName.Value + Fields!LastName.Value 连接两个字段在一个 单元 初级会计实务单元训练题天津单元检测卷六年级下册数学单元教学设计框架单元教学设计的基本步骤主题单元教学设计 格中,并一行显示 =Fields!FirstName.Value & vbCrLf & Fields!LastName.Value 连接两个字段在一个单元格中显示,但是换行显示 2. If表达式使用 =IIF(Fields!LineTotal.Value > 100, True, False) 如果成立执行True的表达式,否则执行False表达式,我可也可以写其它的表达式代替代码里的东西 3. Count表达式使用 =Count(Fields!DAILYCOUNT.Value,"WeldingReportDataSet_T_WelderDaily") 计算WeldingReportDataSet_T_WelderDaily数据集中DAILYCOUNT有多少行 3. Sum表达式使用 =Sum(Fields!DAILYCOUNT.Value,"WeldingReportDataSet_T_WelderDaily") 计算WeldingReportDataSet_T_WelderDaily数据集中DAILYCOUNT的总和 4. Format表达式使用 =CDate(Fields!TOPAINTDATE.Value).ToString("dd MMM yyyy") 对date的格式进行应用 RDLC 报表系列(四) 子报表的使用 一(写作前提 假设有一天,你的老板和你说,公司需要做所有员工的出出差 记录 混凝土 养护记录下载土方回填监理旁站记录免费下载集备记录下载集备记录下载集备记录下载 ,这时子报表的应用是一个不错的选择。 关于怎样创建一个RDLC报表等相关内容,前查看我之前的文章,这里就不在阐述了。 二(RDLC报表模板设计 本篇要做的是一个含有子报表的报表,所以,最少我们需要两个报表模板,一个是Master.rdlc,另外一个是Sub.rdlc。Ok,下面我们就来啰嗦一下怎么设计模板文件吧。 1. 在VS(本人用的是2008的Version,自从小2003之后都支持.rdlc报表)中创建一个新的web application项目。 2. 新增两个新的报表文件,一个名叫master.rdlc,一个名叫sub.rdlc(在选择的时候要注意选择如下)。 3. 现在我们已经有报表模板文件了,再创建主报表和子报表所需要使用的数据类型(所需要的DataSet类型,具体可参阅[原创] RDLC 报表系列(一) 创建一个报表),这里并不多做解释了。 4. 打开 style="mso-bidi-font-weight:bold">master.rdlc文件,从工具箱中拖入一表格控件,设计你所需要的格式,选择所需要的数据源类型,然后在你需要使用子报表的地方从工具臬中插入一上SubReport控件,如下图所示。 5. 然后右击这个SubReport控件,在属性中选择这个子报表指向哪个文件,我们可以选择刚才创建的那个sub.rdlc文件。其次是们还需要为主报表和子报表之关建立关连关系,在属性的Parameters(参数)选择卡中新加我们需要传递给子报表的参数。 在我的报表中用了一个参数如下,当然你也可以根据自己的的需要创建多个你需要传递给子报表的参数。 6. 上面我们讲解完了主报表的设计,他制定了子报表以及子报表准获得的参数。现在打开Sub.rdlc文件,增加子报表所需要的数据源类型,并且创建参数,比如说我上面使用了一个isoOid,所以在子报表中一定有一个参数名称和这个是相同的,他用来接收从主报表传来的筛选数据条件,即用这个参数从子报表中选择符合本记录的所有子记录集。 7. 现在从工具箱中插入一个表格到你的子报表中(当然也可以不需要表格,根据需求定义的),然后右击属性选择所需要的数据源类型,并且根据从Master.rdlc传过来的参数进行筛选,可以在属性窗口的Filters(筛选)选项卡中加入筛选条件即可。 8. 至此我们讲完了报表设计部分,下面我们就去看看,C#中是如何实现的。 三(Base的修改 因为是要用到报表,所以我们需要对子报表的生成事件进行订阅,因此我们把CustomPageBase写成如下。 1 public class CustomPageBase : Page 2 { 3 List subDataSource = new List(); 4 public void GetReportMultipleDataSourceFile(List reportDateSource, string TemplatePath, List parameterList, string FileType, List subDataList) 5 { 6 string reportFormat = FileType; 7 string outputfile = "Report."; //报表名称 8 ReportViewer rview = new ReportViewer(); 9 rview.ProcessingMode = ProcessingMode.Local; 10 rview.LocalReport.ReportPath = Server.MapPath(TemplatePath); 11 rview.LocalReport.DataSources.Clear(); 12 13 //为主报表加数据源 14 foreach (ReportDataSource re in reportDateSource) 15 { 16 if (subDataList.Contains(re.Name)) 17 { 18 subDataSource.Add(re); 19 continue; 20 } 21 rview.LocalReport.DataSources.Add(re); 22 } 23 24 //设置ReportViewer进行事件订阅 25 rview.LocalReport.SubreportProcessing += 26 new SubreportProcessingEventHandler(SubreportProcessingEventHandler); 27 28 if (parameterList.Count > 0) 29 rview.LocalReport.SetParameters(parameterList); 30 string mimeType, encoding, extension, deviceInfo; 31 string[] streamids; 32 Warning[] warnings; 33 deviceInfo = "" + "True" + ""; 34 35 byte[] bytes = rview.LocalReport.Render(reportFormat, deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings); 36 HttpContext.Current.Response.Buffer = true; 37 HttpContext.Current.Response.Clear(); 38 HttpContext.Current.Response.ContentType = mimeType; 39 HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + outputfile + extension + ";"); 40 HttpContext.Current.Response.BinaryWrite(bytes); 41 HttpContext.Current.Response.End(); 42 } 43 44 /// 45 /// 为子报表加数据源 46 /// 47 /// 48 /// 49 void SubreportProcessingEventHandler(object sender, SubreportProcessingEventArgs e) 50 { 51 foreach (var ReportDataSource in subDataSource) 52 { 53 e.DataSources.Add(ReportDataSource); 54 } 55 } 56 } 和之前的一样,重写GetReportMultipleDataSourceFile这个函数,多提供了一个新的参数subDataList,他是用来指定哪些数据源是给子报表的。 四(调用生成报表 1 public partial class _Default : CustomPageBase 2 { 3 protected void Page_Load(object sender, EventArgs e) 4 { 5 6 } 7 8 /// 9 /// Generate the report 10 /// 11 /// 12 /// 13 protected void ButtonGenerate_Click(object sender, EventArgs e) 14 { 15 List reportDataSource = new List(); 16 List subDataSource = new List(); 17 ReportDataSet ds = new ReportDataSet(); 18 string templatePath = string.Empty; 19 20 SqlConnection conn = new SqlConnection (ConfigurationManager.ConnectionStrings["PQMSConnectionString"].ConnectionString); 21 SqlCommand comm = conn.CreateCommand(); 22 comm.CommandText = "select top 200 Oid, DrawingNumber, CWPNo, PaintCode, MasterRevision from ISO_DRAWING"; 23 SqlDataAdapter da = new SqlDataAdapter(comm); 24 da.Fill(ds, "ISO_DRAWING"); //获得主表的内容(Get master table data) 25 26 comm.CommandText = "SELECT S.Oid, S.ISOOid, S.SPOOLNo, S.Location, S.IssueNo, S.CP2 FROM SPOOL AS S INNER JOIN (SELECT TOP 200 OID FROM ISO_DRAWING) AS T ON S.ISOOID = T.OID"; 27 da = new SqlDataAdapter(comm); 28 da.Fill(ds, "SPOOL"); 29 30 reportDataSource.Add(new ReportDataSource("ReportDataSet_ISO_DRAWING", ds.ISO_DRAWING)); 31 reportDataSource.Add(new ReportDataSource("ReportDataSet_SPOOL", ds.SPOOL)); 32 subDataSource.Add("ReportDataSet_SPOOL"); 33 List parameterList = new List(); 34 35 templatePath = "Master.rdlc"; 36 37 GetReportMultipleDataSourceFile(reportDataSource, templatePath, parameterList, "PDF", subDataSource); 38 } 39 }
本文档为【vS2008_Report】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_281650
暂无简介~
格式:doc
大小:510KB
软件:Word
页数:0
分类:生活休闲
上传时间:2017-09-20
浏览量:27