Folks
Using RadControls for ASP.NET AJAX Q1 2013 SP2 with Reporting version = 7.1.13.705. In my report I have a SQLDatasource (i.e. SQLDatasource2).
I would like to Filter that Datasource in Page load event of ASP.net not inside Report NeedDataSource event.
This works in Report NeedDataSource event.
But I would like to filter the Datasource in Page load event of asp.net. I came up with this..
Any help is appreciated. I use Asp.net Ajax a lot, trying to implement Telerik Reporting along with Webforms in a new project. Thanks
gc_0620
Using RadControls for ASP.NET AJAX Q1 2013 SP2 with Reporting version = 7.1.13.705. In my report I have a SQLDatasource (i.e. SQLDatasource2).
I would like to Filter that Datasource in Page load event of ASP.net not inside Report NeedDataSource event.
This works in Report NeedDataSource event.
private void TestReport1_NeedDataSource(object sender, EventArgs e) { //Take the Telerik.Reporting.Processing.Report instance Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender; string stsql = "SELECT M.ManagerID, C.FirstName + ' ' + C.LastName AS Name, E.Gender FROM (SELECT DISTINCT ManagerID FROM HumanResources.Employee) AS M INNER JOIN"; stsql += " HumanResources.Employee AS E ON M.ManagerID = E.EmployeeID INNER JOIN Person.Contact AS C ON E.ContactID = C.ContactID WHERE (E.Gender = N'F') ORDER BY Name"; this.sqlDataSource2.SelectCommand = stsql; }But I would like to filter the Datasource in Page load event of asp.net. I came up with this..
Protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Report1 myReports = new Report1(); Reports.TestReport1 myReport = new Reports.TestReport1(); string stsql = "SELECT M.ManagerID, C.FirstName + ' ' + C.LastName AS Name, E.Gender FROM (SELECT DISTINCT ManagerID FROM HumanResources.Employee) AS M INNER JOIN"; stsql += " HumanResources.Employee AS E ON M.ManagerID = E.EmployeeID INNER JOIN Person.Contact AS C ON E.ContactID = C.ContactID WHERE (E.Gender = N'F') ORDER BY Name";// Need help here to filter SQLDatasource2.. } }Any help is appreciated. I use Asp.net Ajax a lot, trying to implement Telerik Reporting along with Webforms in a new project. Thanks
gc_0620