1
votes

I have managed to set a dataset to my tablix on my report viewer that will hold all items belonging to a bill. The issue I present you with is I cannot seem to add any parameters to my textboxes in my .rdlc report. Is this because I have added a connection to my database? Before I added my connection I could easily add parameters, but not anymore. Take a look at my report:

enter image description here

All the red rectangles is where I would usually have my parameters. Is there a way to programmatically do this?

Dim rpJobNum = New ReportParameter("tbJobNo", JobNum)
rv.rvRdlc.LocalReport.SetParameters(rpJobNum)

rv is my report viewer form

rvRdlc is my report viewer control

tbJobNo is my textbox' job number name

JobNum is a variable which holds the respective value (ex: 10000)

If I execute that,I will receive an error:

enter image description here

Any idea why I cannot seem to add any parameter controls? Perhaps there's another way of doing this?

2

2 Answers

4
votes

Figured out why I couldn't add parameters. Pretty noob stuff on my part.

Go to View > Report Data

Ctrl + Alt + D

Or... Ctrl + Alt + D

My apologies, but, I'll answer this if it can help someone!

0
votes
Dim parmlist As New List(Of ReportParameter)()
parmlist.Add(New ReportParameter("tbJobNo ", JobNum))
print.ReportViewer1.LocalReport.SetParameters(parmlist)

you need to create a list, as i did here