Sales
John Smith
Mary Jones
Human Resources
Steve Garcias
Jeremy Doe
Etc...
However, I'd like the Department Name to print all the way at the very bottom of the page so that every page has its department on the bottom, in the same spot regardless of how many names are on the page (or if the list of names spans several pages each page prints the department name in the same spot). If I add the department name to the Group Footer, it prints directly after the names and I noticed on the forums you cannot align the group footer to the bottom of the page. If I put the department in the Page footer, it just prints the first department name on every page.
This is a simple task in an Access Database Report, but how can I do this in Telerik?
12 Answers, 1 is accepted
The PageHeader and PageFooter sections are not related to the report itself, but are relative to the margins of the report's media, while the Table item is a data driven item. Thus while the Table item is expected to grow depending on it's datasource as data item, the Page Header and the Page Footer section's height and width will remain fixed.For general information related to the sections please check out the Understanding Report Sections help article.
In order to have the correct Department name in a page footer our suggestion is to use an unbound group (group without grouping) and set the group footer PrintOnEveryPage to True. Then you can use the group footer instead of a page footer section.
Check out the attached sample report.
Peter
the Telerik team
this.group1.Groupings.AddRange(new Telerik.Reporting.Data.Grouping[] {
new Telerik.Reporting.Data.Grouping("=Fields.Manufacturer")});
Visual Studio told me there was no "Groupings" namespace found. I had to comment those 2 lines of code out for the solution to compile. Could this be the problem? I'm using the Q1 2010 build.
Full error:
error CS1061: 'Telerik.Reporting.Group' does not contain a definition for 'Groupings' and no extension method 'Groupings' accepting a first argument of type 'Telerik.Reporting.Group' could be found (are you missing a using directive or an assembly reference?)
The error you received is due to changes in the API in the Q3 version.
As for your inquiry, this behavior is by design - i.e. all report sections after the detail would follow it immediately and this cannot be changed.
Sorry for the inconvenience.
All the best,
Steve
the Telerik team
Because I cannot put any dynamic data in the Page Footer, besides page #, I researched how to align a Group section to the bottom of the page on the forums here. I see that people have posted "it's on our TODO list" but those posts are over a year old. Is this functionality something Telerik is going to support in the near future?
Thanks.
I have attached a sample report that shows how to use in a Page Footer section a Group Footer/Header TextBox values. Check out the textbox ItemDataBound event handler in code behind.
P.S. This approach would work only if a department is on a single page.
Give it a try and let us know if you need additional assistance.
Peter
the Telerik team
Car.cs(19,156): error CS0241: Default parameter specifiers are not permitted
However, when I fixed that, the report shows an error on Page 2.
The first error is because I have wrote the class in C# 4.0 and I have used optional parameters.
About the error on page 2, we will need more information, because locally we don't experience any troubles. I have double checked the sample and added it in an empty Class Library. Check out the attached updated sample project and let us know if you still experience any issues.
Peter
the Telerik team
this.manufacturerGroup.Groupings.AddRange(new Telerik.Reporting.Data.Grouping[] {
new Telerik.Reporting.Data.Grouping("=Fields.Manufacturer")});
My version (Q1 2010) does not have the "Groupings" property.
For Q3 2010 we have made a small change in the API:
before Q3 2010 | after Q3 2010 |
Grouping | Groupings |
Sorting | Sortings |
Generally you can easily replace those types with Find and Replace dialog.
I have updated the sample for previous versions of Telerik Reporting.
Best wishes,
Peter
the Telerik team
This approach would only work if a manufacturer is on a single page. We have noted that in the original post the contains the example, as this is "hack" to get what you want.
All the best,Peter
the Telerik team
After looking over some other features of Telerik, I finaly found a work around.
Using the example posted, create the report and place an unbound text box in the page footer.
Set the unbound text box to print out the value of a Report Paramater.
In your code, sort your data, then create an instance of the report for each Grouping. So in this example, create an instance of the report feeding it Honda data and setting the report Paramater to "Honda", then create another report instance for Nissan setting the Paramter to "Nissan". Make sure you set the "mergable" property on your report params to false.
Now create a ReportBook to merge all your reports together.