如何使用数据集的Crystal报表 [英] How Do I Use Crystal Report With Dataset

查看:93
本文介绍了如何使用数据集的Crystal报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是水晶报告的新手....我必须创建一个水晶报告,我已将数据集对象传递给报告....数据集包含一个我需要在报告上显示的表格..这里是代码



 ReportDocument CReport =  new  ReportDocument(); 
CReport.Load(Server.MapPath( 〜/ C_Report / iCard.rpt) );
DataTable dt =(DataTable)HttpContext.Current.Session [ dt];
CReport.SetDataSource(dt);


CrystalReportViewer1.ReportSource = CReport;
CrystalReportViewer1.DataBind();





现在我将数据集中的数据字段添加到报表设计中...

i想实现:从数据表中显示四行以显示在页面上...即每页上记录的四个不同的detials。但我在同一页面上得到相同的记录..下一页的下一条记录

解决方案

使用强类型数据集对象选项



创建xsd类型文件

并将其传递给水晶报告


参考



使用带数据集的C#创建Crystal Reports [< a href =http://www.codeproject.com/Articles/12694/Creating-Crystal-Reports-using-C-with-Datasets\"target =_ blanktitle =New Window> ^ ]





http://www.mindstick.com/Articles/b1fa8372-12c0-4b0e-a870-138fe135a095/?Crystal%20Report%20with%20DataSet [ ^ ]


看到这个.. :)



Crystal Report ASP.Net示例使用C#VB.Net和Visual Studio 2010中的DataSet或DataTable [ ^ ]



使用C#使用DataSet和DataTable的Crystal Report [< a href =http://www.codeproject.com/Articles/28899/Crystal-Report-with-DataSet-and璜Table-using-Ctarget =_ blanktitle =New Window> ^

i am new to crystal report....i have to create a crystal report where i have passed a dataset object to the report.... the dataset consist of a table that i reuqired to display on report.. here is the code

ReportDocument CReport = new ReportDocument();
      CReport.Load(Server.MapPath("~/C_Report/iCard.rpt"));
      DataTable dt = (DataTable)HttpContext.Current.Session["dt"];
      CReport.SetDataSource(dt);


      CrystalReportViewer1.ReportSource = CReport;
      CrystalReportViewer1.DataBind();



now i added the datafields from the dataset to the report design...
i want to achieve : to display four rows from a datatable to be displayed on a page...i.e four differect detials of the record on each page. but i get the same record on the same page..and next record on next page

解决方案

Use strongly type dataset object option

create xsd type file
and pass it to crystal report


Refer

Creating Crystal Reports using C# with Datasets[^]


http://www.mindstick.com/Articles/b1fa8372-12c0-4b0e-a870-138fe135a095/?Crystal%20Report%20with%20DataSet[^]


see this.. :)

Crystal Report ASP.Net Example using DataSet or DataTable in C# VB.Net and Visual Studio 2010[^]

Crystal Report with DataSet and DataTable using C#[^]


这篇关于如何使用数据集的Crystal报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆