I am trying to do a Nominal lodger activity report where there is a self referencing hierarchy for the rows and years/months for the columns. The data is a sum of all transaction values.
I can get the data into a cross tab report but how would I go about making the row groups work with a self referencing hierarchy? I'd have thought that this was a fairly common requirement but unfortunately I can't find any prior examples of this.
4 Answers, 1 is accepted
1) When your data is a tree hierarchy with a random depth, you can use a self-referenced SubReport to achieve the recursive visiting on all the nested levels. Attached is a sample solution that demonstrates how such a report can be done. It uses data from the AdventureWorks sample database so you need to setup it and change the connection string if needed.
2) If you know the nested levels of your data, the task is way easier - you just need to define the relations between the Parent/Child groups, as explained in these documentation articles:
Table/Crosstab/List: Basic concepts
How to: Add groups to Table item and Crosstab item
I hope the provided information is helpful. If I have misunderstood the question, please open a support ticket and send us test data and the report's code files to check your settings.
See What's Next in App Development. Register for TelerikNEXT.
Many thanks for that - I couldn't see the report designer with the attached because of some compile issue however I looked at the designer code and the rest and managed to get my report working from that.
A great solution :)
I have Telerik Reporting version 10.2.16.1025 installed, and when I try to open the designer for this example, I get an error: "Value cannot be null. Parameter name: instance". I realize that the example references its own Reporting dll, version 220.127.116.11. I'm guessing the problem is some discrepancy in the different versions of the VS plugin.
I'm still in the early stages of learning Telerik Reporting, so I am not yet able to just look at the code and figure it out. I wanted to at least see what's going on in the designer to get that view on it. I suppose I will download and install the older version of Reporting just so I can view this example, but I would rather not have to. Would you consider updating this example to work with the latest version of TR?
Also, since I've been searching for this, I've noticed several threads just like this one, and the sample code doesn't run with my installed version. Please consider adding this sample to your built-in Examples project, that way it is always kept up-to-date (I assume someone tests all the example projects with each release, and fixes them if there are problems), and then also people will stop making threads asking for this, since it is included.
Such error can occur when the opened reports/project use different Telerik Reporting version than the installed on your machine. Running the Upgrade Wizard or manually updating the project items should resolve the problem - Upgrading Telerik Reporting Projects.
Note that the project illustrates a custom approach, that should not be considered as ready to use solution.
If you need further help, please feel free to open a support ticket and to send us a demo project that illustrates the problem.
Telerik by Progress