Horizontal Table for your reports

Posted by: the telerik blogs, on 22 Oct 2009 | View original | Bookmarked: 0 time(s)

An user asked us how to create a table where thetable grows horizontally instead of vertically. After some fiddling around, it proved to be quite easy to go about doing that.I started offusing the crosstab item as initial template for this task. As the table would be growing "in columns" instead of "in rows", we do not need a row group so we delete it. Then bind the crosstab to a sample business object making sure we've added as many static rows as we need.Next step in order to show all the data, we need to make sure that the column group has an empty string as grouping criteria i.e. it becomes details group. Just to be clear, depending on the grouping criteria, we have:

  • Dynamic groups - have any Grouping expression, ex. group1.Grouping.Add(new Grouping("=Fields.Country")). For the dynamic groups, the corresponding row/column will repeat for every record of the grouped data.
  • Static groups - no grouping criteria at all. For the static groups the corresponding row/column is rendered only once.
  • Detail groups -have a single empty grouping, ex. group1.Grouping.Add(new Grouping()). Usually you have only one row -or- column detail group. For a detail group the corresponding row/column is repeated for every row of the Table's data source. You may think of the detail TableGroup as the Report's Detail section.

More information on the Table/CrossTab can be found in our documentation here.

And here is the final result:

Horizontal Table

I've attached a short video of the horizontal table creation process, as well as with the final report.

[HorizontalTableReport.zip] [HorizontalTableVideo.zip]

Enjoy!

==============================

Steve

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Regex | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1978 | Hits: 15

Similar Posts

  • ASP.NET 4.0 Dynamic Data and Many to Many Entity Framework Entities more
  • Stimulsoft Reports. New versions of reporting tools for .NET, Web, and WPF more
  • Ruminations on Multi-Tenant Data Architectures more
  • EF Table Splitting The Opposite of Entity Splitting more
  • Reporting Release History : Q2 2009 SP1 (version 3.1.9.807) more
  • LINQ to SQL and Transactions more
  • Reverse Mapping and Using Database Views with Telerik OpenAccess ORM more
  • Report writer for WPF. Long-expected tool. more
  • Issue with ADO.NET Sync Services and SQL Server 2000 more
  • SQL SERVER - Example of DDL, DML, DCL and TCL Commands more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD