I have a TypeReportSource setup which works perfectly, but the parameters added to the report source don't appear in the instantiated report class, i.e. I add 10 here from the model but when I look for them in the NeedDataSource event, the collection is empty.
Newtonsoft is installed from nuget and not in the GAC.
Newtonsoft is installed from nuget and not in the GAC.
@{
var typeReportSource =
new
TypeReportSource() { TypeName = Model.ReportQualifiedAssemblyDetail };
foreach
(var parameter
in
Model.ReportData.Parameters)
{
typeReportSource.Parameters.Add(parameter.Name, parameter.Value);
}
@(Html.TelerikReporting().ReportViewer()
.Id(
"ReportViewer"
)
.ServiceUrl(
"/api/reporting/"
)
.TemplateUrl(
"/ReportViewer/templates/CustomReportViewerTemplate.html"
)
.ReportSource(typeReportSource)
.ViewMode(ViewModes.PRINT_PREVIEW)
.ScaleMode(ScaleModes.FIT_PAGE_WIDTH))
}
Is there something I need to do to get the parameters to appear in the report class, as parameters are rendered useless if I can't actually use them.
Mark