Hello, I am hoping you all can help me out with creating a large table in ignition reports
What I haveI have a dataset of around 30 machines and utilization data for the past month for each of them.
What I want to do with itI want to created a report displaying the information for each machine for the past month and a few summary statistics at the end in a table. I would like the report to automatically create or remove pages as needed (4-6 pages probably needed for the table depending on how the weeks line up). Something like this:
Machine | Day 1 | Day 2 | ...
Machine 01 | 58% | 62% | ...
Machine 02 | 42% | 86% | ...
... | ... | ... | ...
but possibly broken up by week. More on that later.
- Column Width
- My first idea was to use ignition's in-built pagination when expanding vertically. (In this version I had machine name across the top and date along the side.) However, to make this work with the relatively long machine names, I'd need to rotate the text 45° or 90°. The problem, as best I can tell, is that ignition bases the column width off the length of the text regardless of orientation, so, even rotated 90°, the column stayed the same width as the text's length. Shrinking the column just lead to the text wrapping awkwardly and unreadably.
- Table Pagination
- After encountering the above issues, I came to the conclusion that I'd have to have machine names down the left column, so I flipped my dataset to allow that. The problem I run into here is that I can't figure out a way to make the table paginate based on horizontal extent. To get around this, I have been pre-making columns by hand with a different pointer(?, I forget the correct term here) for each day (e.g.
@Day01@, @Day02@, ..., @Day31@).
This comes with two major downsides: 1) It is tedious to create and tedious to edit formatting as each change must be repeated 5 times to keep formatting consistent and 2) It doesn't dynamically match the data available. It will always have a day 31 column regardless of the actual number of days in that month.
- Manual Pagination
- One idea I'm currently working on but am not sure how to implement satisfactorily is to make each page a week (Sun - Sat) and generate the appropriate number of weeks to cover a whole month. This means I'd need 4-6 pages to exist to cover the whole month. The problem is that I don't know how, or if you even can, manually control whether or not a page exists. I don't want to display effectively empty pages whenever a month doesn't cover six weeks. Ideally, the pages for weeks 5 and 6 would only appear if they were needed and would be omitted otherwise, skipping right from week 4 to a summary page.
- Bonus: Table Wrapping
- Finally, as a bonus problem, I have a summary table at the end of my report displaying mean values for every day of the month. It is below a chart, so its height is limited, but there is plenty of space to the sides. I would like it to wrap around and become 2-3 tables with the later ones picking up where the previous left off (i.e. table part 1 is day 1-10, part 2 is to part 1's right and is day 11-20, etc.). However, the best I can do at this time is paginate and generate a whole new page with a duplicate graph to continue the table.
- Is there a better way to do this?
- Can pages be manually turned on or off?
- Can tables be made to paginate horizontally after a set number of columns?
- Is there a means to rotate text vertically so as to shrink the columns?
- Is there any way to make a table "wrap" vertically or "paginate" on the same page but over slightly?
If you've made it this far, thank you for taking the time to consider my problem.