how to integrate telerik reporting in sitefinity 4.x
Hi Telerik Team
i have made a telerik reporting program. which is generating reports from a diffrent database and displaying it in a windows form application.
now i want to integrate it in sitefinity as a module
please tell me how can i do this
Thanks
Navneet Tyagi
Hi Navneet,
If this is a windows application the only way to populate some controls with data in Sitefintiy is by using a web service or WCF
You could a take a look at our Jobs sample module included in the SDK package.
Inside the module and its Install method you need to create a new BackendContentView and initialize your own definition where you call the custom web service.
sample
public override void Install(SiteInitializer initializer) var pageManager = initializer.PageManager; var modulesNode = pageManager.GetPageNode(SiteInitializer.ModulesNodeId); .... ..... var id = this.LandingPageId; var landingPage = pageManager.GetPageNodes() .SingleOrDefault(p => p.Id == id); if (landingPage == null) var pageInfo = new PageElement() PageId = this.LandingPageId, Name = "CustomModule", MenuName = "CustomModuleTitle", UrlName = "CustomModuleUrlName", Description = "CustomModuleDescription", HtmlTitle = "CustomModuleHtmlTitle", ResourceClassId = ResourceClassId, IncludeScriptManager = true, ShowInNavigation = false, EnableViewState = false, TemplateName = SiteInitializer.BackendTemplateName ; var controlPanel = new BackendContentView() ModuleName = CustomModule.ModuleName, ControlDefinitionName = CustomModuleDefinitions.BackendCustomModuleDefinitionName ; initializer.CreatePageFromConfiguration(pageInfo, moduleNode, controlPanel); public class CustomModuleDefinitions static CustomModuleDefinitions() SystemManager.GetApplicationModule(CustomModule.ModuleName); internal static ContentViewControlElement DefineCustomModuleBackendContentView(ConfigElement parent) / var backendContentView = new ContentViewControlElement(parent) ControlDefinitionName = BackendCustomModuleDefinitionName, ContentType = typeof(ModuleItem) ; MasterGridViewElement customModuleGridView = new MasterGridViewElement(backendContentView.ViewsConfig) ViewName = CustomModuleDefinitions.BackendCustomModuleListViewName, ViewType = typeof(MasterGridView), AllowPaging = true, DisplayMode = FieldDisplayMode.Read, ItemsPerPage = 50, ResourceClassId = typeof(CustomModuleResources).Name, SortExpression = "Title ASC", Title = "CustomModuleTitle", SearchFields = "Title", GridCssClass = "sfListViewGrid", ClientMappedCommnadNames = customModuleClientMappedCommnadNames, WebServiceBaseUrl = "~/Sitefinity/Services/Content/CustomModuleService.svc/" ; var externalScripts = new Dictionary<string, string>(); externalScripts.Add("Telerik.Sitefinity.Samples.CustomModule.Web.Scripts.CustomModuleMasterGridViewExtensions.js, Telerik.Sitefinity", "OnMasterViewLoaded"); customModuleGridView.ExternalClientScripts = externalScripts;