@section header
{
@Styles.Render("~/Content/telerikCss")
<
style
type
=
"text/css"
>
#telerikReportViewer
{
overflow: hidden;
width: 100%;
height: 595px;
min-height: 595px;
}
</
style
>
}
<
div
class
=
"row"
>
<
div
class
=
"col-lg-12"
>
@{
var typeReportSource = new TypeReportSource { TypeName = Model.SelectedReportName };
if (typeReportSource.TypeName == "")
{
typeReportSource.TypeName = null;
}
}
@(Html.TelerikReporting().ReportViewer().Id("telerikReportViewer")
.ServiceUrl(@Url.Content("~/api/reports/"))
.TemplateUrl(@Url.Content("~/Content/ReportViewer/templates/telerikReportViewerTemplate-8.2.14.1204.html"))
.ReportSource(typeReportSource)
.ViewMode(ViewModes.PRINT_PREVIEW)
.ScaleMode(ScaleModes.SPECIFIC)
.Scale(1.0)
.PersistSession(false)
)
</
div
>
</
div
>
@section scripts
{
@Scripts.Render("~/bundles/reportsJS")
<
script
type
=
"text/javascript"
>
$(document).ready(function() {
$("#telerikReportViewer")
.telerik_ReportViewer({
parameterEditors: [
{
match: function (parameter) {
return Boolean(parameter.availableValues) && !parameter.multivalue;
},
createEditor: function (placeholder, options) {
var dropDownElement = $(placeholder).html('<
div
></
div
>'),
parameter,
valueChangedCallback = options.parameterChanged,
dropDownList;
function onChange() {
var val = dropDownList.value();
valueChangedCallback(parameter, val);
}
return {
beginEdit: function (param) {
parameter = param;
$(dropDownElement).kendoDropDownList({
dataTextField: "name",
dataValueField: "value",
dataSource: parameter.availableValues,
change: onChange
});
dropDownList = $(dropDownElement).data("kendoDropDownList");
}
};
}
}]
});
});
</
script
>
}
// Specifying the assembly qualified name of the Report class for the TypeName of the report source<
br
>
ViewerReportSource = new TypeReportSource {TypeName = selectedReport.ReportType.AssemblyQualifiedName};<
br
><
br
>
// create instance of report
<
br
>var report = (Report)Activator.CreateInstance(selectedReport.ReportType);
<
br
><
br
>
// Set filters (datasource params)<
br
>
var ds = report.DataSource as SqlDataSource;<
br
>
ds.Parameters["@UserID"].Value = 999;
OK I have looked in the docs to no avail.
Take a look at the attached files. What I want to do is get the value that is in the first section Total
(This is a group footer section in Telerik) in the example the value is 81 and I want to show this value in the report footer section. I want to do the same thing for the next group. Things work great when used under the group, and for the entire report SUM() works but how would I display a group value that is the result of a SUM() on the group in the report footer?
I’m sure this can’t be hard but can’t seem to find the info on what to put into the text box value.
I was thinking it might be something like value = MyReport. sectionNamesGroupFooter(0). Sum(Fields.Count) or something with the 0 representing the first group if I wanted the value of the second group I would use value = MyReport. sectionNamesGroupFooter(1). Sum(Fields.Count)
Thanks