Hi all. In VB.Net 2013 I am trying to test a simple report, with the data supplied solely by parameters. I have created Report1.rdlc. In its "Report Data" view, under Parameters, I have created four parameters (KComp, KCompLabel, DispPrice, DispPriceLabel). On the report are four textboxes corresponding to the parameters, and their expressions are all like this (with corresponding parameter names of course): =Parameters!KComp.Value
On my form I have ReportViewer1. Under its "Choose Report" I have selected Report1, which is the only .rdlc in my project.
In my form code, to keep it simple, I am explicitly assigning the parameter values like so:
However this code never makes it to the last line. Upon exectuting the Reportviewer1.localreport.setparameters command it stops and shows the (blank) form with (empty) reportviewer. So I think I have two issues, one programmatic and one in the IDE. Programmatic: why does it bomb out on that line and why don't I have data on my report? and IDE: Why doesn't it put up an error window?
Any help would be vastly appreciated.
Chandler
On my form I have ReportViewer1. Under its "Choose Report" I have selected Report1, which is the only .rdlc in my project.
In my form code, to keep it simple, I am explicitly assigning the parameter values like so:
VB.NET:
Imports System
Imports System.IO
Imports System.Data
Imports System.Text
Imports System.Drawing.Imaging
Imports System.Drawing.Printing
Imports System.Collections.Generic
Imports Microsoft.Reporting.WinForms
Imports System.Xml
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim params(3) As Microsoft.Reporting.WinForms.ReportParameter
params(0) = New Microsoft.Reporting.WinForms.ReportParameter("KComp", "$444")
params(1) = New Microsoft.Reporting.WinForms.ReportParameter("KCompLabel", "COMPARE")
params(2) = New Microsoft.Reporting.WinForms.ReportParameter("DispPrice", "$333")
params(3) = New Microsoft.Reporting.WinForms.ReportParameter("DispPriceLabel", "OUR PRICE")
ReportViewer1.LocalReport.SetParameters(params)
Me.ReportViewer1.RefreshReport()
End Sub
However this code never makes it to the last line. Upon exectuting the Reportviewer1.localreport.setparameters command it stops and shows the (blank) form with (empty) reportviewer. So I think I have two issues, one programmatic and one in the IDE. Programmatic: why does it bomb out on that line and why don't I have data on my report? and IDE: Why doesn't it put up an error window?
Any help would be vastly appreciated.
Chandler