List<
ReportVentasFamiliaDto
> dataSource = new List<
ReportVentasFamiliaDto
>();
dataSource.Add(new ReportVentasFamiliaDto()
{
PorcentajeIva = 10,
FamiliaNombre = "Familia"
});
var objectDataSource = new Telerik.Reporting.ObjectDataSource();
objectDataSource.DataSource = dataSource;
objectDataSource.DataMember = "table1";
var typeReportSource = new TypeReportSource() {
TypeName = "Report1.trdp" };
typeReportSource.Parameters.Add(new Parameter()
{
Name = "objectDataSource2",
Value = objectDataSource
});
typeReportSource.Parameters.Add(new Parameter()
{
Name = "Text",
Value = "valor"
});
}
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.ServiceUrl(Url.Content("/api/reports/"))
.TemplateUrl("/Resources/Templates/telerikReportViewerTemplate.html")
.ReportSource(typeReportSource)
.ViewMode(ViewMode.Interactive)
.ScaleMode(ScaleMode.Specific)
.Scale(1.0)
.PersistSession(false)
.PrintMode(PrintMode.AutoSelect)
)
How can I pass the datasoource as a parameter?