VB.NET – How to split a large number of table data into smaller-related tables? (Not a database problem)

I really hope that I can describe this problem in an understandable way. This is a problem I can’t start to solve, even if I (mostly) understand it. I just don’t Determine where to start, I really hope someone can move me in the right direction.

I have a large data table. It describes the relationship between objects. Suppose the Y axis There are items numbered 1-1000, and the X axis also has items 1-1000. If item #234 on the Y axis is related to item #791 on X, there will be a mark in the table where the rows and columns cross. In some industries, this is called a truth table. People can see at a glance how many items in the system are related to each other. The tags in the table help identify trends and patterns.

This is about Some other useful things of tabular nature:

>The entire range of the relational number (r) of each item on any axis can be 1<= r<= axisTotal.
> X axis and The Y axis will share common items, but each axis will also have items that the other axis does not.
>Each item will only exist once per axis. It can be on X and Y, but it will only be on each axis. One time.
>The total number of items on each axis is likely not equal. Each axis can have 50 to 1000 items.

The final result is that this will be a report that needs to be printed. We I have successfully printed a table on 11 inch X 17 inch paper with about 100-150 items on each axis. Other than that, it started to become so small that it is difficult to understand.

What I want to do is to split the super large table into smaller tables, but the related points need to be kept together. If I grab items 1-100 on X, then I will need every item related to Y Projects.

I have generated many of these tables. Although the number of relationships can be arbitrary, I have never seen projects related to all other projects. So in practice, the scope is more like 1 <= r<=(10%* axisTotal). If the relationship of the item exceeds this range, it can be split into multiple tables, but this is not optimal at all. At the end of the day, I think if you put 1000× The 1000 item list is divided into 8 to 10 smaller printed pages of related forms, we and our customers will be very happy. Any guidance will be a great help! Thank you.--Edit--
It is also worth noting that there are no empty rows or columns in the table. Each item on the x-axis and y-axis is related to at least one item on the opposite axis.

< p> – -Edit – –
This is an example of a small truth table I am describing: Each row and each column have at least one relationship.

– -Edit – –
May 18th, 2011
For its value, my performance on this project was pretty good, I was pulled for a few weeks. So there will be a while before I get back to this question. But this is what I must Problem solved as soon as possible.

– -Edit – –
July 11, 2011
Vagrant. Well, it looks like I can’t solve this problem right now. I really hope I can figure it out This point. After discussion, we decided to use the truth table as an additional resource for the main report in the Excel spreadsheet. Excel 2007 and later will handle more than 1,000 columns, which is enough. In addition, we have added some VBA to allow The viewer double-clicks the column header. This action will reduce the rows to only interactive rows. Then it deletes the empty columns. In this way, they can see a small sub-table based on the items they want to view, and can do as needed Print it.

This is not an answer, I just want to try to visualize your data better. Does it look like this?

Alice Bob Charlie ... Zelda
Shoes XX
Hats XX
Gloves X
...< br />Pants X

Edit

Do I need to display the data in a table format? Or you can list each one? It’s like:

>Alice

>shoes

>Bob

>hat
>pants

>Charlie

>shoes
>gloves

>Zelda

>hat

or another One way:

>shoes

>Alice
>Charlie

>hat

>Bob
> Zelda

>Gloves

>Charlie

>Pants

>Bob

Edit 2< /p>

Okay, I have made another larger truth table, hoping to better understand how you want to split:

ABCDEFGHIJKLMNOPQRSTU VWXYZ 
1 xxxx
2 xxxxxx
3 xxxx
4 xxx
5 xxx
6 xxx
7 xxx
8 xxx

For the sake of argument, we can say that you can only put 4 rows on one page (because I don’t want to type out a huge form in the morning) so we will divide it into two pages. First, show that each row is very Important, right? Second, do you need to display columns that never have values. For example, Y and Z never have values ​​from rows 1 to 8 in this table, can they be excluded from the report, or do they still need to exist? Third, does the order of the lines matter?

If it is not important to show completely empty columns, then we can delete 10 columns from the above table and compress them to:

ABCEFHILMOPQRUVW
1 xxxx
2 xxxxxx
3 xxxx
4 xxx
5 xxx
6 xxx
7 xxx
8 xxx

Then, if the row order is not important, you can further compress it by using the best row arrangement (not necessarily shown here). The following two tables are further compressed into 11 and 10 columns:

< /p>

ABCFHIMPQRU
1 xxxx
2 xxxxxx
5 xxx
7 xxx

AEHILMOPUW
3 xxxx
4 xxx
6 xxx
8 xxx

Am I going the wrong way here? These are questions that help me better understand your data and output requirements.

And, seriously, is it possible to choose a larger printer/plotter? In addition, can I choose to generate PDF and use Acrobat's print tile option?

I really hope I can describe this problem in an understandable way. This is a difficult problem I can’t start to solve, even if I (mostly) understand it I'm just not sure where to start, I really hope someone can move me in the right direction.

I have a large data table. It describes the relationship between objects Suppose the Y axis has items numbered 1-1000, and the X axis also has items 1-1000. If item #234 on the Y axis is related to item #791 on X, there will be a mark in the table where the row Cross with columns. In some industries, this is called a truth table. One can see at a glance how many items in the system are related to each other. The markers in the table help identify trends and patterns.

Here are some other useful things about the nature of the table:

>The entire range of the relational number (r) of each item on any axis can be 1<= r<= axisTotal.
> X-axis and Y-axis will share common items, but each axis will also have items that the other axis does not have.
>Each item will only exist once for each axis. It can be on X and Y, but it It will only be on each time.
>The total number of items on each axis is likely not equal. Each axis can have 50 to 1000 items.

The final result is that this will be one that needs to be printed Report. We have successfully printed a table on 11 inch X 17 inch paper with about 100-150 items on each axis. Other than that, it started to become so small that it was difficult to understand .

What I want to do is to split the very large table into smaller tables, but the related points need to be kept together. If I grab items 1-100 on X, then I will need to Each item related to Y.

I have generated many of these tables. Although the number of relationships can be arbitrary, I have never seen items related to all other items. So in actual operation, the scope More like 1<=r<=(10%*axisTotal). If the relationship of the items exceeds this range, you can split it into multiple tables, but this is not optimal at all. At the end of the day, I think If you divide the 1000×1000 item table into 8 to 10 smaller printed pages of related tables, we and our customers will be very happy. Any guidance will be a great help! Thank you.--Edit--
It is also worth noting that there are no empty rows or columns in the table. Each item on the x-axis and y-axis is related to at least one item on the opposite axis.

< p> – -Edit – –
This is an example of a small truth table I am describing: Each row and each column have at least one relationship.

– -Edit – –
May 18th, 2011
For its value, my performance on this project was pretty good, I was pulled for a few weeks. So there will be a while before I get back to this question. But this is what I must Problem solved as soon as possible.

– -Edit – –
July 11, 2011
Vagrant. Well, it looks like I can’t solve this problem right now. I really hope I can figure it out This point. After discussion, we decided to use the truth table as an additional resource for the main report in the Excel spreadsheet. Excel 2007 and later will handle more than 1,000 columns, which is enough. In addition, we have added some VBA to allow The viewer double-clicks the column header. This action will reduce the rows to only interactive rows. Then it deletes the empty columns. In this way, they can see a small sub-table based on the items they want to view, and can do as needed Print it.

This is not an answer, I just want to try to visualize your data better. Does it look like this?

Alice Bob Charlie ... Zelda
Shoes XX
Hats XX
Gloves X
...< br />Pants X

Edit

Do I need to display the data in a table format? Or you can list each one? It's like:

>Alice

>Shoes

>Bob

>hat
>pants

>Charlie

>shoes
>gloves

>Zelda

>hat

or another One way:

>shoes

>Alice
>Charlie

>hat

>Bob
> Zelda

>Gloves

>Charlie

>Pants

>Bob

Edit 2< /p>

Okay, I have made another larger truth table, hoping to better understand how you want to split:

ABCDEFGHIJKLMNOPQRSTU VWXYZ 
1 xxxx
2 xxxxxx
3 xxxx
4 xxx
5 xxx
6 xxx
7 xxx
8 xxx

For the sake of argument, we can say that you can only put 4 rows on one page (because I don’t want to type out a huge form in the morning) so we will divide it into two pages. First, show that each row is very Important, right? Second, do you need to display columns that never have values. For example, Y and Z never have values ​​from rows 1 to 8 in this table, can they be excluded from the report, or do they still need to exist? Third, does the order of the lines matter?

If it is not important to show completely empty columns, then we can delete 10 columns from the above table and compress them to:

ABCEFHILMOPQRUVW
1 xxxx
2 xxxxxx
3 xxxx
4 xxx
5 xxx
6 xxx
7 xxx
8 xxx

Then, if the row order is not important, you can further compress it by using the best row arrangement (not necessarily shown here). The following two tables are further compressed into 11 and 10 columns:

< /p>

ABCFHIMPQRU
1 xxxx
2 xxxxxx
5 xxx
7 xxx

AEHILMOPUW
3 xxxx
4 xxx
6 xxx
8 xxx

Am I going the wrong way here? These are questions that help me better understand your data and output requirements.

And, seriously, is it possible to choose a larger printer/plotter? In addition, can I choose to generate a PDF and use Acrobat's print tile option?

Leave a Comment

Your email address will not be published.