Hello,
I am having a MSSQL database table(table name: event) which is containing seven columns as: "eventid","name","type","amount","currency","date","note".
Now I am making a RDLC Report where I am just wanting to display the "note" column's data and for this purpose I did follow the following steps:-
----------------------------------------------------------------------
1) I did add a blank "Report" to my Windows Application.
2) I did drag and drop a "ReportViewer" control to the page where I am wanting to display the report.
3) Now I did write the following code to the Load event of the form (which is containing the ReportViewer control):-
Dim da As New SqlDataAdapter("select * from [event]", con)
Dim ds As New DataSet
da.Fill(ds, "ALLDATA")
Dim ds_count As Integer
ds_count = ds.Tables(0).Rows.Count
ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
ReportViewer1.LocalReport.ReportPath = System.Environment.CurrentDirectory & "\Report5.rdlc"
ReportViewer1.LocalReport.DataSources.Clear()
ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("ALLDATA", ds.Tables(0)))
ReportViewer1.DocumentMapCollapsed = True
Dim params(ds_count) As Microsoft.Reporting.WinForms.ReportParameter
For a As Integer = 0 To ds.Tables(0).Rows.Count - 1
params(a) = New Microsoft.Reporting.WinForms.ReportParameter("note", ds.Tables(0).Rows(a)(6).ToString)
Next
ReportViewer1.LocalReport.SetParameters(params)
ReportViewer1.RefreshReport()
4) I opened the blank "Report" which I had added to my project, with Visual Studio. Then from the menu, I clicked the "Report" and did select "Report Parameters...".
And added a Parameter with the following values:-
________________________________________________
Name: note
Data Type: String
Hidden: YES
Allow blank value: YES
Default values: Null
________________________________________________
5) Now added a Texbox control to the blank RDLC Report and set its value to: "=Parameters!note.Value"
6) Form the "Smart Tag" of the ReportViewer control, I did select the associated rdlc report (which is "Report5.rdlc", in this case).
Now the main problem is, this textbox control is showing ONLY just the first value of the required MSSQL database's column(column name: "note") instead of all the values of this column.
I also tried to add a table or a list to the RDLC Report and put this textbox control within that table/list control. But still no luck.
Please Note: I am NOT wanting to add any dataset to the RDLC Report's UI.
Please let me know what can I do next to resolve this issue and oblige me thereby.
Regarding my project: It is a Windows Application which is being made by VB.Net of Visual Studio 2008 SP1 and SQL Server 2000 Database.
--------------------------------
Thanks.