开发者

Data Transfer to a DataSet in vb.net

I have 7 variables and i need to transfer them in a dataset

I have already create the file with extension .xsd and i have already a report file .rdlc I see the Dataset "DataTable"in my rdlc file but i can't see any field

It gives me error of "No Dataset is Linked to the document"

From the other han开发者_JAVA技巧d it sees the dataset in the selection dataset !!!

So at this point I'm completely confused

Please is there anybody which can assist me?


Using a Dataset seems like overkill (you can use anything that is IEnumerable) but if you just want to add a row in a DataSet using code you simiply create an instance and call the Add Method on the Tables Row collection.

    Dim ds As TestDS = New TestDS()

    ds.YourTableName.Rows.Add(txtInputA.Text,
                          txtInputB.Text,
                          txtInputC.Text,
                          txtInputD.Text, 
                          txtInputE.Text,
                          txtInputF.Text,
                          txtInputG.Text

                         )

Then you can just add it to the DataSources collection

    lr.DataSources.Add(new ReportDataSource("Variables", ds))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜