I'm working on developing a best practices for reporting in our application.
Currently we're looking at SSRS (SQL Server Reporting Services) and Telerik (we use the client controls).
After looking at the documentation and installing the reporting tools I've come up against a wall at getting some basic data to display in a report.
Generally our app deals exclusively with entity objects. On many pages we have a RadGrid in which we use the NeedDatasource event to call a static method on the type of the entity that the grid will display. In this method we create a LINQ query and get back an IQueryable of entity objects which is then passed back to the datasource of the grid. The dataset is set to the enumeration of the IQueryable. We would like to continue doing this flow with reporting.
Our app currently moves the user through several wizard like screens of gathering information regarding what the report data will entail. Once this data is collected a stored procedure is called that then gathers these "parameters" and does the calculations to produce a result set. This result set basically contains some aggregate data that is brought together from various places in the database and worked into a meaningful order via the business logic in the stored procedure in regards to the user's inputs.
Even once this "report data" is created another query may be necessary to bring in some meaningful data from the inputed parameters. This is really necessary when displaying in SSRS from the Reporting Server as each row in this query would be a displayable item in the report (the grouping of the report may change the query slightly but that is more a consideration once I have a complete understanding of how the report is to be designed).
So, the point is that this stored procedure generates the data for a single report and stores it in a table that contains this data for previously run reports. My ideal situation would be to have the web page (or in our next version Silverlight control) call a method on the static type of the entity that represents this table of results that would return back the cached results for the report and pass this along to the telerik report.
This seams simple in theory. I would just set the datasource for the report to be the results of this method call. Am I correct in this assumption?
It should be noted that this is all fine and dandy if I can get to the point of actually "running" the report (I say running because the stored procedure actually creates the data and stores it in a table; in my simplest idea of how this would work the actually telerik report would "run" when it got the results of this query from a table - this report may be "run" multiple times but the stored procedure would only be run when the user wanted get the most up-to-date info). Right now I cannot get the report designer to allow me to design a report with an object.
How do I do this??? I have created a report project and added it to my solution. In this project I have included a reference to the assembly that deals exclusively with creating these entity objects and handing them off to consumers. In the wizard I have followed the steps to use an object as a data source yet there are no auto-generated columns shown for the report nor are they appearing under the "Data Explorer". The "Data Explorer" shows "No Data Source".
This leaves me wondering how to design a report when I cannot see the datasource in the designer. I assume it would be possible for me to hand code each expression. This seems tedious and time consuming.
The biggest advantages for us using Telerik's reporting is that we can embed the report in Silverlight and that we supposivly use Entity Framework business objects (or POCO - plain old class object) as a data source. It just seems to me that it is possible, but just difficult or not a "best practice".
Please provide some ideas where I might be making bad assumptions, have incorrect ideas of what is possible, or some solutions to make our desired workflow possible.
Thanks,
Michael Gardner
Currently we're looking at SSRS (SQL Server Reporting Services) and Telerik (we use the client controls).
After looking at the documentation and installing the reporting tools I've come up against a wall at getting some basic data to display in a report.
Generally our app deals exclusively with entity objects. On many pages we have a RadGrid in which we use the NeedDatasource event to call a static method on the type of the entity that the grid will display. In this method we create a LINQ query and get back an IQueryable of entity objects which is then passed back to the datasource of the grid. The dataset is set to the enumeration of the IQueryable. We would like to continue doing this flow with reporting.
Our app currently moves the user through several wizard like screens of gathering information regarding what the report data will entail. Once this data is collected a stored procedure is called that then gathers these "parameters" and does the calculations to produce a result set. This result set basically contains some aggregate data that is brought together from various places in the database and worked into a meaningful order via the business logic in the stored procedure in regards to the user's inputs.
Even once this "report data" is created another query may be necessary to bring in some meaningful data from the inputed parameters. This is really necessary when displaying in SSRS from the Reporting Server as each row in this query would be a displayable item in the report (the grouping of the report may change the query slightly but that is more a consideration once I have a complete understanding of how the report is to be designed).
So, the point is that this stored procedure generates the data for a single report and stores it in a table that contains this data for previously run reports. My ideal situation would be to have the web page (or in our next version Silverlight control) call a method on the static type of the entity that represents this table of results that would return back the cached results for the report and pass this along to the telerik report.
This seams simple in theory. I would just set the datasource for the report to be the results of this method call. Am I correct in this assumption?
It should be noted that this is all fine and dandy if I can get to the point of actually "running" the report (I say running because the stored procedure actually creates the data and stores it in a table; in my simplest idea of how this would work the actually telerik report would "run" when it got the results of this query from a table - this report may be "run" multiple times but the stored procedure would only be run when the user wanted get the most up-to-date info). Right now I cannot get the report designer to allow me to design a report with an object.
How do I do this??? I have created a report project and added it to my solution. In this project I have included a reference to the assembly that deals exclusively with creating these entity objects and handing them off to consumers. In the wizard I have followed the steps to use an object as a data source yet there are no auto-generated columns shown for the report nor are they appearing under the "Data Explorer". The "Data Explorer" shows "No Data Source".
This leaves me wondering how to design a report when I cannot see the datasource in the designer. I assume it would be possible for me to hand code each expression. This seems tedious and time consuming.
The biggest advantages for us using Telerik's reporting is that we can embed the report in Silverlight and that we supposivly use Entity Framework business objects (or POCO - plain old class object) as a data source. It just seems to me that it is possible, but just difficult or not a "best practice".
Please provide some ideas where I might be making bad assumptions, have incorrect ideas of what is possible, or some solutions to make our desired workflow possible.
Thanks,
Michael Gardner