EnVisageOnline/Main/Source/EnVisage/Views/Reporting/Index2.cshtml

82 lines
3.8 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using EnVisage.Code
@using Telerik.ReportViewer.Mvc
@using Telerik.Reporting
@model System.Type
@{
ViewBag.Title = "Reports";
}
@section stylesheets
{
@Styles.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-reportstyles"))
}
@section scripts
{
<script type="text/javascript">
var datePickerOptions = {
format: 'm/d/yyyy',
autoclose: true,
startDate: '@(Constants.MIN_SELECTABLE_DATE)',
endDate: '@(Constants.MAX_SELECTABLE_DATE)'
};
</script>
@Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "kendo-reporting"))
@Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-reportpage"))
@(Html.TelerikReporting().DeferredScripts())
}
<div class="container-fluid" id="team-container">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-white panel-compact">
<div class='panel-body' style="overflow:hidden;">
@(Html.TelerikReporting().ReportViewer()
// Each report viewer must have an id - it will be used by the initialization script
// to find the element and initialize the report viewer.
.Id("reportViewer1")
// The URL of the service which will serve reports.
// The URL corresponds to the name of the controller class (ReportsController).
// For more information on how to configure the service please check http://www.telerik.com/help/reporting/telerik-reporting-rest-conception.html.
.ServiceUrl(Url.Content("/api/reports/"))
// The URL for custom report viewer template. The template can be edited -
// new functionalities can be added and unneeded ones can be removed.
// For more information please check http://www.telerik.com/help/reporting/html5-report-viewer-templates.html.
.TemplateUrl(Url.Content("~/Content/reporttemplates/telerik.html"))
// Strongly typed ReportSource - TypeReportSource or UriReportSource.
.ReportSource(new TypeReportSource() { TypeName = Model.AssemblyQualifiedName })
// Specifies whether the viewer is in interactive or print preview mode.
// PrintPreview - Displays the paginated report as if it is printed on paper. Interactivity is not enabled.
// Interactive - Displays the report in its original width and height with no paging. Additionally interactivity is enabled.
.ViewMode(ViewMode.Interactive)
// Sets the scale mode of the viewer.
// Three modes exist currently:
// FitPage - The whole report will fit on the page (will zoom in or out), regardless of its width and height.
// FitPageWidth - The report will be zoomed in or out so that the width of the screen and the width of the report match.
// Specific - Uses the scale to zoom in and out the report.
.ScaleMode(ScaleMode.Specific)
// Zoom in and out the report using the scale
// 1.0 is equal to 100%, i.e. the original size of the report
.Scale(1.0)
// Sets whether the viewers client session to be persisted between the pages refreshes(ex. postback).
// The session is stored in the browsers sessionStorage and is available for the duration of the page session.
.PersistSession(false)
.ParametersAreaVisible(true)
// Sets the print mode of the viewer.
.PrintMode(PrintMode.AutoSelect)
.Deferred()
.ParameterEditors(editors => editors.MultiSelectEditor("registerMultiSelectEditor"))
.ParameterEditors(editors => editors.SingleSelectEditor("registerSingleSelectEditor"))
.ParameterEditors(editors => editors.DateTimeEditor("registerDateEditor"))
.ParameterEditors(editors => editors.NumberEditor("registerNumberEditor"))
.ParameterEditors(editors => editors.StringEditor("registerTextEditor"))
.ParameterEditors(editors => editors.BooleanEditor("registerSwitcherEditor"))
.ClientEvents(e => e.Error("rptError"))
.ClientEvents(e => e.UpdateUi("updateReportUi"))
)
</div>
</div>
</div>
</div>
</div>