Hi,
i'm try to pass two parameter to my report, in WPF/MVVM scenario, but the report can't see(Missing or invalid parameter value.). To be sure that report have the right parameters, i've put a texbox(into report) and set his value to the parameter's value. When i refresh report, "Missing or invalid parameter value" disappare, the textbox value have the correct ID but report no fetch record from Datasource.
This is my code:
XAML:
<tr:ReportViewer telerik:StyleManager.Theme="Material" IsEnabled="{Binding ReportEnabled}"
ReportSource="{Binding FormInternalReport_Source, Mode=TwoWay}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.ColumnSpan="2" />
ViewModel:
private ReportSource _FormInternalReport_Source;
public ReportSource FormInternalReport_Source
{
get { return _FormInternalReport_Source; }
set
{
Set<ReportSource>(() => this.FormInternalReport_Source, ref _FormInternalReport_Source, value);
}
}
private void ExecuteInsert(object parameter)
{
//Report are enable only when Insert Button is clicked
ReportEnabled = true;
FormInternalReport_Source = new InstanceReportSource { ReportDocument = new Form_Internal(Report_ID) };
FormInternalReport_Source.Parameters.Add(new Telerik.Reporting.Parameter(new Telerik.Reporting.Parameter("ID", Report_ID) ));
FormInternalReport_Source.Parameters.Add(new Telerik.Reporting.Parameter(new Telerik.Reporting.Parameter("LanguageID", 1) ));
try
{
RaisePropertyChanged("FormInternalReport_Source");
}
catch(Exception ex)
{ }
}
Can someone help me?
Thanks.