将数据表值分配给数据集的数据表 [英] assign the datatable value into datatable of the dataset

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

问题描述

亲爱的朋友,我正在为公司做桌面应用程序.
实际上我需要在Windows报表中显示一些内容.我有一个数据集和一个带有数据集中的数据表(可报表).我将此数据集用作报表的来源.

Query ="SELECT Item_Description,来自库存控件的库存";
.
.
.
public DataTable table = new DataTable();
LogInDBAdapter.Fill(table);

从填充的表格中,我需要获取数据集(datatable-reporttable)的数据以在Windows报告中显示.

请帮助我完成这个项目.
谢谢

dear friends i am doing a desktop application for my company.
Actually i need to display some content in windows report.I have a dataset and a datatable(reporttable) with in dataset.I use this dataset as source of the report.

Query = "SELECT Item_Description,Stock FROM Inventory_Control";
.
.
.
public DataTable table = new DataTable();
LogInDBAdapter.Fill(table);

from the filled table i need to get the data for the dataset(datatable-reporttable) to display it in windows report.

kindly help me complete this project.
Thank you

推荐答案

2选项:

1:代替使用public DataTable table = new DataTable();
使用:DataSet table = new DataSet(); 保留其余代码,您现在就可以直接使用此数据集.
在报告中使用表格.

2:创建一个新的数据集并将此表添加到其中.
2 Options:

1: Instead of using public DataTable table = new DataTable();
Use: DataSet table = new DataSet(); Keep rest of code as it is and you can directly use this dataset now.
Use table in your report.

2: Create a new dataset and add this table to it.
DataSet myDS = new DataSet();<br />
myDS.Tables.Add(table);



在报表中使用myDS.



Use myDS in your report.


感谢sandeep,
我现在有了一些主意,但即使我对此问题也不清楚,

在项目中,我使用的是class(icclass),其中使用查询来填充表.
在我的表单中,我声明了一个数据集dset = new dataset();
dset.tables.add(icclasss.table);
我添加了一个名为数据集1的新数据集,并在其中创建了一个数据表1.我计划使用此数据表1创建报告.
现在,我创建了一个对象数据集1 ds =新的dataset1();
现在我想将dset表值分配给ds表(datatable1).
否则,我想直接从填充表创建报告.
您的帮助是必要的!
谢谢!
thank sandeep,
I got some idea now,but even i am not clear about the issue,

In the project i am using the class(icclass) where i am filling the table using the query.
In my form i declared a dataset dset= new dataset();
dset.tables.add(icclasss.table);
I Added a new dataset named dataset1,and i create a datatable1 in that.i planned to create a report using this datatable1.
Now i created a object dataset1 ds = new dataset1();
Now i want to assign the dset table values to the ds table(datatable1).
or otherwise i want to create a report directly from the filled table.
You help is needful!
thank you!


这篇关于将数据表值分配给数据集的数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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