This is a migrated thread and some comments may be shown as answers.

Cross tab report with a self referencing hierarchy

4 Answers 248 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 27 Mar 2015, 09:54 AM
Hi,

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.

Regards

Jon

4 Answers, 1 is accepted

Sort by
0
Accepted
Stef
Telerik team
answered on 01 Apr 2015, 09:07 AM
Hello Jon,

    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.

Regards,
Stef
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Jon
Top achievements
Rank 1
answered on 07 Apr 2015, 02:16 PM

Hi Stef,

 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 :)

Regards

 Jon

0
Christopher
Top achievements
Rank 1
answered on 14 Nov 2016, 02:10 PM

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 9.0.15.34.  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. 

0
Stef
Telerik team
answered on 14 Nov 2016, 02:56 PM
Hello Christopher,

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.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Jon
Top achievements
Rank 1
Answers by
Stef
Telerik team
Jon
Top achievements
Rank 1
Christopher
Top achievements
Rank 1
Share this question
or