.AvailableValues.ValueMember the value isn't found because I'm using the needdatasource event to bind my business object to the datasouce.
Is there anyway this value doesn't need to be set? I'm filtering myself in the needdatasource event and am not sure how to get this to work.
------------- Here is the code in the constructor.
InitializeComponent();
string[] groupTypes = new string[5] { "All", "Connect k & OnePlan", "NON WSA", "WSA", "Administrators" };
this.ReportParameters["UserGroups"].AvailableValues.DataSource = groupTypes;
this.ReportParameters["UserGroups"].AvailableValues.ValueMember = "=Fields.UserGroups";
------------- Need Datasource looks as follows
Inventory.Report.Properties.
Settings settings = new Inventory.Report.Properties.Settings();
DbUtils.ActualConnectionString = settings.InventoryConnectionString;
ActivityLogCollection data = new ActivityLogCollection();
SortExpression s = new SortExpression(new SortClause(ActivityLogFields.ActivityLogId, SortOperator.Descending));
PredicateExpression f = new PredicateExpression();
f.Add(
ActivityLogFields.ActivityLogType == 1);
if (this.ReportParameters["UserGroups"].Value != null && this.ReportParameters["UserGroups"].Value.ToString().Length > 0 && !this.ReportParameters["UserGroups"].Value.ToString().Equals("All"))
{
f.AddWithAnd(
new FieldLikePredicate(ActivityLogFields.UserGroups, null, "%" + this.ReportParameters["UserGroups"].Value + "%"));
}
data.GetMulti(f, -1, s);
(sender
as Telerik.Reporting.Processing.Report).DataSource = data;
Seems like I should just be able to specify a parameter even if the report doesn't have a fields associated to it?
Thanks,