Hey
I made an application that generates reports about the work that my clients employees do. The application does everything that is requested, but my client additionally requested that the data shown in reports should be grouped by the employee who performed it (each employee and the work he's done is represented by a database entry). Let me clarify this request:
A report about a single employee contains a header with his name, last name, serial number and then the report data contains time he got to/off work and some other informations. Now that is done just fine, but how can I make the general report (for all employees) that would display all the data in the database but divided into sections (it should look like all the individual reports got pasted on the same report) so that when the general report is viewed, the viewer can still see who did what. I used the VS 2010 to create my application, if that is of any relevance.
I have no idea how to do this, so please advise. If I failed to provide some informations that you need, please tell me.
Thanks
Loading
ThomasPosted Feb 20, 2012, 6:35 PM
1) Can you build the query for the report to return all the employees?
2) Are you using the UI to select an individual employee? If so can you add an 'All' to that list? (I typically use the UI to let the users select all their filters, then build the data set (query for the report) in the code based on those filters. That allows me to use the same RLDC for several different reports just by passing in a different dataset. I also include a field that defines the type of report so that the header can be customized based on the report type.
Now, so that you don't have to wait for me to get your answers, here are some suggestions based on assumptions. (if the assumptions are wrong it may not help)
Assuming you can return all the employees in one query, Modifying the report is VERY easy. Open the report and select one of the detail rows then right click on the icon to the left of the row (3 thick dark bars). In the menu that pops up there will be a 'Insert Group' option. You can then add a group on the employee number and just move the employee information from the report header to the group header.
If you use the UI to pass in the filters then you can also pass in whether it is a single employee report or all of them. In that case you can use the same RDLC so that if you ever have to update one, both will be updated at the same time.
If you just have them select the reports without passing in the dataset, then you may need to save a new RDLC file and remember to update them both if you make any changes to either.
Neven DraskovicPosted Feb 21, 2012, 3:53 AM