or
if (!string.IsNullOrWhiteSpace((string)ReportParameters["DatumOd"].Value) && !string.IsNullOrWhiteSpace((string)ReportParameters["DatumDo"].Value)) { this.group2.Groupings.Clear(); this.group2.Groupings.AddRange(new Telerik.Reporting.Grouping[] { new Telerik.Reporting.Grouping("=Fields.Sifra") }); //this.group2.Sortings.AddRange(new Telerik.Reporting.Sorting[] { new Telerik.Reporting.Sorting("=", Telerik.Reporting.SortDirection.Asc) }); this.groupFooterSection2.Visible = false; } else if (!string.IsNullOrWhiteSpace((string)ReportParameters["RazdobljeOd"].Value) && !string.IsNullOrWhiteSpace((string)ReportParameters["RazdobljeDo"].Value)) { this.group2.Groupings.Clear(); this.group2.Groupings.AddRange(new Telerik.Reporting.Grouping[] { new Telerik.Reporting.Grouping("=Fields.Razdoblje") }); //this.group2.Sortings.AddRange(new Telerik.Reporting.Sorting[] { new Telerik.Reporting.Sorting("=", Telerik.Reporting.SortDirection.Asc) }); }public MyReport(Uri stylesheet): this(){ this.ExternalStyleSheets.Clear(); this.ExternalStyleSheets.Add(new ExternalStyleSheet(stylesheet));}public ActionResult MyReport(){ var xml = new Uri("http://mydomain.com" + Url.Action("ReportStyleSheet", "Theme")); var report = new MyReport(xml); return ReportViewer(report);}private ViewResult ReportViewer(Report report){ return View("ReportViewer", report);}public ActionResult ReportStyleSheet(){ var xml = string.Empty; if (this.Request.IsAuthenticated) { //replaceDictionary replaces the color schemes xml = template.BuildTemplate("ReportStyleSheet.xml", replaceDictionary); } return Content(xml, "application/xml"); }<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Telerik.Reporting.Report>" %><%@ Register assembly="Telerik.Reporting, Version=7.0.13.521, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.Reporting" tagprefix="telerik" %><%@ Register assembly="Telerik.ReportViewer.WebForms, Version=7.0.13.521, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %><telerik:ReportViewer ID="ReportViewer1" style="height: 700px; width: 100%; margin-bottom: 30px;" runat="server"></telerik:ReportViewer><script runat="server"> public override void VerifyRenderingInServerForm(Control control){ // to avoid the server form (<form runat="server"> requirement}protected override void OnLoad(EventArgs e){ base.OnLoad(e); try { var instanceReportSource = new InstanceReportSource(); instanceReportSource.ReportDocument = Model; ReportViewer1.ReportSource = instanceReportSource; } catch (Exception ex) { Response.Write(ex.Message); }} </script>