Hello,
for a report a like to have a dropdown box with values to choose from.
According to examples I put the following code in the constructor:
ReportParameters["Agent"].AvailableValues.DataSource = new object[];
ReportParameters["Agent"].AvailableValues.ValueMember = "Fields.Item";
ReportParameters["Agent"].Visible = true;
ReportParameters["Agent"].Type = ReportParameterType.String;
When I compile it shows the report with a textbox on top.
Now when I change the code to:
ReportParameters["Agent"].AvailableValues.DataSource = new object[] {"test"};
ReportParameters["Agent"].AvailableValues.ValueMember = "Fields.Item";
ReportParameters["Agent"].Visible = true;
ReportParameters["Agent"].Type = ReportParameterType.String;
and I try to open the report it says:
Object reference not set to an instance of an object.
Source: Telerik.ReportViewer.Wpf.
I use Telerik Reporting Q2 2015.
I've loooke dover everuthing but I guess still mssing something.
Andy direction would be appreciated.
Kind regards
Jeroen