I am using VS2010 VB.net and Ultimate 2013.1. I have been able to create a report but I need to be able to pass the parameters from the application code rather than have the user input. I am not familiar with using XAML or HTML. Can I pass these parameters using vb?
I have created a WPF User Control in my VB Application which then gives me the ability to programmatically update the parameters to the report. Still working on this interface. Are there plans to include this feature for VB Forms?
Hi,
I'm going to point you to a forum thread where there is a dropdown to enable selecting one of two reports and the textboxes provide value that will be supplied via parameters to the reports.
I know you mentioned that you want to value the parameters in code but that is actually being done depending on which report is selected from the combobox. They are using the textboxes to provide the parameter value and assigning the value to a parmeter by name.
You can see in the report the parameters being defined and linked to the reports, and the values for the reports are being passed from the code behind.
http://ko.infragistics.com/community/forums/p/73167/370166.aspx
Please let me know if this helps you.
My application is in VB.Net (windows desktop). All the examples were for web programming which I haven't gotten into. I did try the on-line documentation and, in frustration, gave feedback. I was rewarded with the information that I needed:
You can handle the Form.Load event and set the parameter values by using UltraReportViewer.Parameters.Add() method. You will need to pass in a Parameter object that has its ParameterName and ParameterValue properties already set.
The following subroutine works for my needs. I can call it anytime I need to change the values of the parameters for this report.
Private Sub ChangeParameters()
Try
Dim PRptDwgNo As New Infragistics.Win.UltraWinReportViewer.Parameter
Dim PRptDwgRev As New Infragistics.Win.UltraWinReportViewer.Parameter
If strParameter.Length = 2 Then
Me.UltraReportViewer1.Parameters.Clear()
PRptDwgNo.ParameterName = "PDwgNo"
PRptDwgRev.ParameterName = "PDwgRev"
PRptDwgNo.ParameterValue = strParameter(0)
PRptDwgRev.ParameterValue = strParameter(1)
Me.UltraReportViewer1.Parameters.Add(PRptDwgNo)
Me.UltraReportViewer1.Parameters.Add(PRptDwgRev)
Me.UltraReportViewer1.RefreshReport()
End If
Catch ex As Exception
MsgBox("Change Parameters" & vbCrLf & ex.Message)
End Try
End Sub
Thanks
Glad to hear that you have found the solution to your question.
Please let me know if you have further questions.