I have a TON of tables in my dictionary and I'm trying to simplify things for the user by organizing them in some way. I was hoping there was a way I could group them, like in folders. My first attempt was to put each in a different data source, which worked nicely in the dictionary but when you add a text item they aren't organized by data source anymore.
Now I'm looking at relations to see if they'll work for what I need. Here are the questions I have:
1. Are they 1 data row to 1 data row relations only, or could I have a relation with multiple rows? For example, say I have a table called Children and another called Toys and I want to group Toys under Children. Since every child might own more than one toy, can I have a Children to Toys relation where there are multiple toys?
2. If I can have multiple rows in a relation, is there a way to loop through just the relations in something like a data band? When I create a data band it doesn't seem like I can select a relation and thus I loop through every Child instead of every Toy that one child owns.
3. With relations, can I hide the tables somehow outside the relations so they aren't visible in my list of tables twice (once as their own table and once as a relation)?
4. Is there a way to add relations in the JSON file that I pass to dataSet.readJson()?
5. Is this the best way to organize data tables for the user or is there another way?
Thanks so much!
How to organize your tables and questions about relations
Re: How to organize your tables and questions about relation
Hello.
1. Sure, you should create a relation where the Parent DataSource will be the Children and the Child DataSource will be the Toys table.
2. You should create a Master-Detailed report to show the Toys for each Child. You could read more how to create such report on the User Manual.
3. Unfortunately, no. You get a little different columns on these data sources. The Column that you get for the own table is connected to the current record of this Data Source and the Columns that you get on relation are connected to the record of the related Data Source. So you could one the same Column from the same Data Source, but you will get the different result.
4. If there are nested elements in the JSON, the tables with relations will be created.
5. Unfortunately, there is no way to organize the data sources. Usually we suggest to add necessary Data Sources only. If you add vary many Data Sources it could slow down the report engine very much.
We will be to answer all you questions if you have any.
Thank you.
1. Sure, you should create a relation where the Parent DataSource will be the Children and the Child DataSource will be the Toys table.
2. You should create a Master-Detailed report to show the Toys for each Child. You could read more how to create such report on the User Manual.
3. Unfortunately, no. You get a little different columns on these data sources. The Column that you get for the own table is connected to the current record of this Data Source and the Columns that you get on relation are connected to the record of the related Data Source. So you could one the same Column from the same Data Source, but you will get the different result.
4. If there are nested elements in the JSON, the tables with relations will be created.
5. Unfortunately, there is no way to organize the data sources. Usually we suggest to add necessary Data Sources only. If you add vary many Data Sources it could slow down the report engine very much.
We will be to answer all you questions if you have any.
Thank you.