Posted 18 December 2018, 9:42 am EST
I have a Flex Report with two parameters (StartDate and EndDate). I am calling the report, setting the connection string and setting those values in code using the following code:
Dim rptPath As String = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) & "\Reports\UsageSummaryReport.flxr" Dim ConnStr As String = "Provider=sqloledb;" & ConnString C1FlexReport1.Load(rptPath, "UsageSummaryReport") C1FlexReport1.DataSource.ConnectionString = ConnStr C1FlexReport1.Parameters.Item("StartDate").Value = StartDate C1FlexReport1.Parameters.Item("EndDate").Value = EndDate Try C1FlexViewer1.DocumentSource = C1FlexReport1 Catch ex As Exception MsgBox(ex.ToString) End Try
When the report runs I get the error “No value for one or more required parameters”
There are no other parameters other than the two that I set and I have verified that the variables being passed contain valid values. If I preview the report in the designer and enter the parameter values, it works just fine. Any ideas?