Created
January 3, 2014 01:02
-
-
Save mgroves/8230564 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ReportingController : BaseController | |
| { | |
| public ActionResult Index() | |
| { | |
| var objDataSource = new ObjectDataSource(); | |
| objDataSource.DataSource = typeof (EzReportData); | |
| objDataSource.DataMember = "GetAllTerritories"; | |
| objDataSource.Parameters.Add("ez", typeof(int), 1); | |
| var report = new TerritoryReport(); | |
| report.DataSource = objDataSource; | |
| var reportSource = new InstanceReportSource(); | |
| reportSource.ReportDocument = report; | |
| ViewBag.TheReport = reportSource; | |
| return View(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <body> | |
| @(Html.TelerikReporting().ReportViewer() | |
| .Id("reportViewer1") | |
| .ServiceUrl("/api/reports/") | |
| .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.html") | |
| .ReportSource((InstanceReportSource)ViewBag.TheReport) | |
| .ViewMode(ViewModes.INTERACTIVE) | |
| .ScaleMode(ScaleModes.SPECIFIC) | |
| .Scale(1.0) | |
| .PersistSession(false) | |
| ) | |
| </body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment