Hello:
I can't seem to figure out how to display a ReportParameter's DisplayMember in a report. The ReportParameter is set via a SQL query.
I am generating the parameter using the code below:
"client_id" is an int, "name_display" is a string.
I have a textbox on the report that I am attempting to fill in the report's ItemDataBound event like this:
Obviously this only returns the "client_id" member. I need it to display the "name_display" member. How can I accomplish this?
I can't seem to figure out how to display a ReportParameter's DisplayMember in a report. The ReportParameter is set via a SQL query.
I am generating the parameter using the code below:
reportParameter1.Name =
"ClientId"
;
reportParameter1.Type = Telerik.Reporting.ReportParameterType.String;
reportParameter1.UI.AllowBlank =
false
;
reportParameter1.UI.Visible =
true
;
reportParameter1.UI.AvailableValues.DataSource = ds.Tables[1];
reportParameter1.UI.AvailableValues.DisplayMember =
"name_display"
;
reportParameter1.UI.AvailableValues.ValueMember =
"client_id"
;
this
.ReportParameters.Add(reportParameter1);
"client_id" is an int, "name_display" is a string.
I have a textbox on the report that I am attempting to fill in the report's ItemDataBound event like this:
this
.tbClientId.Value =
string
.Format(
"Client Id = {0}"
, reportParameter1.Value.ToString());
Obviously this only returns the "client_id" member. I need it to display the "name_display" member. How can I accomplish this?